
'COMPACT LAYOUS USING {..} 
type vector single x,y,z
type color  single r,g,b,a

class body
  vector position,size,orientation,velocity,spin
  color ambient,diffuse,specular
  single density
  method mass() as single {return density * size.x * size.y * size.z}
  method constructor ( single x,y,z) { size={x,y,z} : density=1 }
  method destructor () {}
end class

'#recordof body

new body rock (2,3,4)

print "mass of rock is " rock.mass
del rock




