Web Analytics

CREATING A 3D DISK ROTATION SIMULATION


The same motion rendered in 3D is displayed on the second panel, singleDrawing3DPanel, which is a Drawing3DPanel object from the Interface palette. Dragging it into the element tree produces the structure shown below:

HtmlView, element tree, Drawing3DPanel object from the Interface palette

Figure 16: HtmlView element tree, Drawing3DPanel object from the Interface palette

  1. 1. disk3D (3D shape) — represents the rotating disk, implemented as a Cylinder3D object.
  2. 2. axle — also cylindrical, so it uses the same Cylinder3D class as disk3D.
  3. 3. marker3D — a segment on the top surface of the disk that rotates with it around the fixed axis. Similar to the 2D marker, but selected from the 3D Drawable palette.
  4. 4. ω3D — the angular velocity vector, chosen from the 3D Drawable palette’s third tab as an Arrow3D object.
  5. 5. ωtext3D — a 3D text object displaying the angular velocity.
HtmlView element tree, ω3D Arrow3D object from the Interface palette

Figure 17: HtmlView element tree, ω3D Arrow3D object from the Interface palette

The complete 3D view appears as follows:

Disk rotation 3D view

Figure 18: Disk rotation 3D view

On the panel object, set the minimum and maximum coordinates to display, the display mode, and the camera parameters. The panel properties are divided into main panel settings and camera settings:

3DPanel object properties from the Interface palette

Figure 19: 3DPanel object properties from the Interface palette

For the camera:

Camera settings for the 3DPanel object from the Interface palette

Figure 20: Camera settings for the 3DPanel object from the Interface palette

The camera is focused at the origin of the 3D coordinate system, positioned along the negative Y-axis at 0.8 units, and oriented in the equatorial plane (analogous to Earth’s equator) and its perpendicular plane by the spherical angles shown in the Properties dialog above (Camera Altitude and Camera Azimuth). See the full example in the video on the page: Disk Rotation Simulation – Creating the Simulation

© Copyright 2019 Slobodan Tršek