Set the level of detail when rendering spheres.
syntax
sphereDetail(ures, vres) sphereDetail(res)
parameters
ures | number of "slices" in sphere |
vres | number of "stacks" in sphere |
res | number of "slices" and "stacks" in sphere |
examples
change number of slices
def display(): lighting(False) translateX(-3) sphere(2.0) translateX(6) color(green) sphereDetail(24, 12) sphere(2.0)
change number of stacks
def display(): lighting(False) translateX(-3) sphere(2.0) translateX(6) color(green) sphereDetail(12, 24) sphere(2.0)
change both slices and stacks
def display(): lighting(False) translateX(-3) sphere(2.0) translateX(6) color(green) sphereDetail(24) sphere(2.0)
resolution comparison
def display(): lighting(False) resolution = 6 translateX(-8) for i in range(9): sphereDetail(resolution) sphere(1.0) resolution += 2 translateX(2)