Constructive Solid Geometry
Union
union{
//put shapes to join together in here
}
For example:
union{
sphere {
<0, 0, 0>, 1
}
sphere {
<0, 1, 0>, 1
}
pigment { Salmon }
}
Intersection
intersection{
//put in here shapes where only the bits that overlap will show
}
For example:
intersection{
sphere {
<0, 0, 0>, 1
}
sphere {
<0, 1, 0>, 1
}
pigment { Salmon }
}
Difference
difference{
//use all of the shapes listed to cut out of the first shape listed
}
For example:
difference{
sphere {
<0, 0, 0>, 1
}
sphere {
<0, 1, 0>, 1
}
pigment { Salmon }
}
Challenges
- show 1 quarter of a donut shape (use a box, torus and intersection)
- drill a cylinder hole through a box shape (use difference)
- make a smiley face (cut out 2 eyes and a mouth from a sphere)