Reputation: 69
Use of the VPython library to create a small table in a simulated 3D space
this is what I've got
top = box(pos=vector(-1,4,4),
axis=vector(-1.5,0,-1.5),
size=vector(18,0.29,10),
up=vector(5,25,5),
color = color.blue)
leg1 = cylinder(pos=(-3,-3,0),
axis=vector(0,7,0), radius=0.45,
color = color.green )
leg2 = cylinder(pos=vector(3.5,-5,3),
axis=vector(0,9,0), radius=0.45,
color = color.green )
leg3 = cylinder(pos=vector(10.5,-3.9,2),
axis=vector(0,9,0), radius=0.45,
color = color.green )
leg4 = cylinder(pos=vector(-11.5,-6.5,-2.2),
axis=vector(0,11,0), radius=0.45,
color = color.green )
The first image is what I got and the second image is what I want, but turned upside down as a table would
Upvotes: 0
Views: 249
Reputation: 1
Try drawing out the table top and legs on paper The up of the table top should be default The legs should have the same "length" To have the legs point downwards use a negative y
If the center of your table is 0,0,0 then the legs will reflect each other's positions in reference to that.
Upvotes: 0