Skip to content
Snippets Groups Projects
Commit e2526bee authored by patbazd's avatar patbazd
Browse files

ejercicio3

parent cdf57bdf
No related branches found
No related tags found
No related merge requests found
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Molécula de metano en X3D</title>
<script type='text/javascript' src='https://www.x3dom.org/download/x3dom.js'> </script>
<link rel='stylesheet' type='text/css' href='https://www.x3dom.org/download/x3dom.css'>
</link>
</head>
<body>
<h1>Molécula de metano en X3D</h1>
<p>Este es un ejemplo de grafo de escena de la molécula de metano (CH4) en X3D.</p>
<x3d width='1500px' height='800px'>
<!-- Configuración de la escena -->
<scene>
<!-- Átomos de la molécula -->
<!-- Átomo de C -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='0, 0, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0.5 0.5 0.5'></material>
</appearance>
<!-- Geometría (esfera de radio 1.2) -->
<sphere radius='1.2'></sphere>
</shape>
</transform>
<!-- Átomo de H (1) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='2, 0, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 1 0'></material>
</appearance>
<!-- Geometría (esfera de radio 0.6) -->
<sphere radius='0.6'></sphere>
</shape>
</transform>
<!-- Átomo de H (2) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='-2, 0, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 1 0'></material>
</appearance>
<!-- Geometría (esfera de radio 0.6) -->
<sphere radius='0.6'></sphere>
</shape>
</transform>
<!-- Átomo de H (3) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='0, 2, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 1 0'></material>
</appearance>
<!-- Geometría (esfera de radio 0.6) -->
<sphere radius='0.6'></sphere>
</shape>
</transform>
<!-- Átomo de H (4) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='0, -2, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 1 0'></material>
</appearance>
<!-- Geometría (esfera de radio 0.6) -->
<sphere radius='0.6'></sphere>
</shape>
</transform>
<!-- Enlaces -->
<!-- Enlace entre átomos C y H (1) -->
<!-- Posición del átomo en (x,y,z) y rotación del átomo en el eje z 190º -->
<transform translation='1, 0, 0' rotation="0 0 1 190">
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 0 1'></material>
</appearance>
<!-- Geometría (cilindro de radio 0.2 y de altura 1.2) -->
<cylinder radius='0.2' height='1.2'></cylinder>
</shape>
</transform>
<!-- Enlace entre átomos C y H (2) -->
<!-- Posición del átomo en (x,y,z) y rotación del átomo en el eje z 190º -->
<transform translation='-1, 0, 0' rotation="0 0 1 190">
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 0 1'></material>
</appearance>
<!-- Geometría (cilindro de radio 0.2 y de altura 1.2) -->
<cylinder radius='0.2' height='1.2'></cylinder>
</shape>
</transform>
<!-- Enlace entre átomos C y H (3) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='0, 1, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 0 1'></material>
</appearance>
<!-- Geometría (cilindro de radio 0.2 y de altura 1.2) -->
<cylinder radius='0.2' height='1.2'></cylinder>
</shape>
</transform>
<!-- Enlace entre átomos C y H (4) -->
<!-- Posición del átomo en (x,y,z) -->
<transform translation='0, -1, 0'>
<shape>
<!-- Apariencia (color) -->
<appearance>
<material diffuseColor='0 0 1'></material>
</appearance>
<!-- Geometría (cilindro de radio 0.2 y de altura 1.2) -->
<cylinder radius='0.2' height='1.2'></cylinder>
</shape>
</transform>
</scene>
</x3d>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment