|
Implicit Modelling Python Examples
|
Example One - a sphere
# |
Running the above:
pybv oneExample Two - Two spheres
Example Three - a spiral of spheres
#
# Graphics Jungle Project - Examples of using pycsoft
#file: two.py
# Use pybv to view this file
#
# Author : Brian Wyvill
# This version January 2000
#
# run this file by typing : pybv twotitle = "pycsoft examples single softy"
def two(o):
o.begin()
o.colour((0.9, 0.1, 0.1 ))
o.push()
o.translate(-0.575,0,0)
o.sphere()
o.pop()
o.colour((0.0, 0.8, 0 ))
o.push()
o.translate(0.575,0,0)
o.sphere()
o.pop()
o.blend()#show a single primitive
def showtwo():
o = pycsoft.CSoft()
two(o)
return o#add to the display menu
def blobtrees():
return [
('two',showtwo,())
]Running the above:
pybv two![]()
# |
|
Running the above:pybv recurse![]()
![]()
![]()