Une cube amélioré avec que des transform

Contenu du snippet


Source / Exemple :


#VRML V2.0 utf8
Transform {
	children [
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation 1 1 1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 0 0 1 1.57
			translation 0 1 1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation 1 -1 1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 0 0 1 1.57
			translation 0 -1 1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation -1 1 1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation -1 -1 1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation 1 1 -1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 0 0 1 1.57
			translation 0 1 -1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation 1 -1 -1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 0 0 1 1.57
			translation 0 -1 -1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation -1 1 -1
		}
		Transform {
			children Shape {
				geometry Sphere {
					radius .3
				}
				appearance Appearance {
					material Material {
						diffuseColor 1 0 0
					}
				}
			}
			translation -1 -1 -1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			translation 1 0 -1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			translation 1 0 1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			translation -1 0 -1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			translation -1 0 1
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 1 0 0 1.57
			translation -1 -1 0
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 1 0 0 1.57
			translation -1 1 0
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 1 0 0 1.57
			translation 1 -1 0
		}
		Transform {
			children Shape {
				geometry Cylinder {
					radius .1
				}
				appearance Appearance {
					material Material {
						diffuseColor 0 1 0
					}
				}
			}
			rotation 1 0 0 1.57
			translation 1 1 0
		}
	]
}

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.