MATLAB SIMULINK 3D ANIMATION - S Guide de l'utilisateur Page 30

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 490
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 29
1 Getting Started
1-16
# This is a comment line
WorldInfo {
title "Bouncing Ball"
}
Viewpoint {
position 0 5 30
description "Side View"
}
DEF Floor Box {
size 6 0.2 6
}
DEF Ball Transform {
translation 0 10 0
children Shape {
appearance Appearance {
material Material {
diffuseColor 1 0 0
}
}
geometry Sphere {
}
}
}
The first line is the VRML header line. Every VRML file must start with this header line.
It indicates that this is a VRML 2 file and that the text objects in the file are encoded
according to the UTF8 standard. You use the number sign (#) to comment VRML worlds.
Everything on a line after the # sign is ignored by a VRML viewer, with the exception of
the first header line.
Most of the box properties are left at their default values – distance from the center
of the coordinate system, material, color, and so on. Only the name Floor and the
dimensions are assigned to the box. To be able to control the position and other
properties of the ball, it is defined as a child node of a Transform type node. Here,
the default unit sphere is assigned a red color and a position 10 m above the floor. In
addition, the virtual world title is used by VRML viewers to distinguish between virtual
worlds. A suitable initial viewpoint is defined in the virtual world VRML file.
When displayed in a VRML viewer, the floor and red ball look like this:
Vue de la page 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 489 490

Commentaires sur ces manuels

Pas de commentaire