Roulette (2019)

Author's sample script, wroks, hints.
Post Reply
User avatar
3DfromNULL
Site Admin
Posts: 24
Joined: 2018-Jul-13 9:35

Roulette (2019)

Post by 3DfromNULL » 2019-Apr-24 5:02

Let's make a 3D model of roulette and a animation for it from the empty. First, we define the name of parts as:
Image

Let's assign variable names to dimensions. These are defined only at the beginning of the 1st script. The 2nd and the 3rd script reffers the dimensions not from the 1st script but from the created objects if needed.
Image

Image
Image
Finished and rendered images. Added the green table and some spot lights by hand (not by the script).

What the 1st script should do is to make some cylinders, cubes, tori, texts, small pyramids, and a sphere, and to apply some boolean operations to them. For example, the shape of a hole of pocket frame is cylinderA - cylynderB - CubeA - CubeB.
Image

As another choice, we could use texture map (i.e. a 2D image) to display numbers, but that is not generative.
Image
Let's make 3D numbers instead.
Image



Attached three scripts are for (1) Making a model of roulette, (2) Coloring the model, and (3) Add physical properties to the model. The 1st script must be executed before other ones.
You can run these script with tS5.1 and later. But if you use tS5, you should set two fixation points by your hand because the tS5's tsxAPI does not have the function for setting these points. The two fixation points should be set on the z-axis of the rotor to avoid precession.

After the 3rd script's execution was done, you can click "Start simulation" button. It will take very long time, compute and make a physical simulation. Before click it, you should adjust the simulation time, the number of simulation steps for one frame, the gravitational acceleration, the properties of the rotor and a created ball. To get results you want, you may adjust initial rotation/linear speeds of rotor and ball. You don't have to redo the physical simulation after you changed these speeds, and can get the result by "Play" button. But please note that you should rewind animation (using "Return to start" button) before you change these values, colors, locations, rotations, sizes. Otherwise (i.e. changing values at time non-zero) you will get a property-changing-animation.
Attachments
010_roulette1d.py
script file for modeling
(22.25 KiB) Downloaded 86 times
020_roulette_color1a.py
script file for coloring
(6.03 KiB) Downloaded 83 times
030_roulette_anim1b.py
script file for animating
(5 KiB) Downloaded 83 times

Post Reply