backface culling

12 views
Skip to first unread message

Robert Martin

unread,
Feb 15, 2016, 11:08:50 AM2/15/16
to Glowscript Users
Can it be done, with quad or triangle? I don't see any mention. Seems to be disabled by default. 
Alternatively, or perhaps additionally, could the box object be allowed to have a negative size, to be inverted?

On another matter, the spheres of the points object is a placeholder, right? Tens of thousands of points aren't too feasible as spheres. 

Bruce Sherwood

unread,
Feb 15, 2016, 11:20:34 AM2/15/16
to glowscri...@googlegroups.com
On my computer 10000 points work okay; I can rotate and zoom in the program shown below. It is true that attempting 1000000 points doesn't work, and there would indeed be an advantage to using points rather than spheres.

p = points(color=color.cyan, radius=1)
N = 10000
for i in range(N):
    p.append(10*vector.random())

The standard behavior of VPython is to show both the inside and outside of objects, so that one sees something upon zooming inside a box, and hence also both sides of a triangle or quad. This could in principle be a user-controlled choice. What is your need for this?
Reply all
Reply to author
Forward
0 new messages