External Exam Download Resources Web Applications Games Recycle Bin

Constructive Solid Geometry



union intersection difference

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
  1. show 1 quarter of a donut shape (use a box, torus and intersection)
  2. drill a cylinder hole through a box shape (use difference)
  3. make a smiley face (cut out 2 eyes and a mouth from a sphere)