TFormPoint.bb 550 B

12345678910111213141516171819202122
  1. ; TFormPoint example
  2. Graphics3D 640, 480
  3. s = CreateSphere() ; center at (0,0,0) north pole at (0,1,0)
  4. MoveEntity s, 1,2,3 ; center at (1,2,3) north pole at (1,2+1,3)
  5. ScaleEntity s, 10,10,10 ; center at (1,2,3) north pole at (1,2+10,3)
  6. ; Now verify that the north pole is at (1,12,3) in the 3d world
  7. TFormPoint 0,1,0, s,0 ; north pole transformed from sphere to world
  8. message$ = "North pole is at ( "
  9. message = message + TFormedX() + ", " + TFormedY() + ", " + TFormedZ() + " )"
  10. Text 180, 200, message
  11. Flip
  12. WaitKey()
  13. End