// Draw a 2d line joining 3D objects // set the resolution SetVirtualResolution(800,480) // create 2 cubes CreateObjectBox(1,20,20,20) // the moving cube CreateObjectBox(2,20,20,20) // the stationary cube SetObjectPosition(2,20,50,60) // position and point the camera SetCameraPosition(1,0,150,-300) SetCameraLookAt(1,0,0,0,0) do // this bit of code makes object 1 move in a circle, centered on the 0,0,0 point SetObjectPosition(1,0,0,0) RotateObjectLocalY(1,1) MoveObjectLocalZ(1,50) // translate the 2 cubes 3D coordinates to 2D screen coordinate screen_x# = GetScreenXFrom3D(GetObjectX(1),GetObjectY(1),GetObjectZ(1)) screen_y# = GetScreenYFrom3D(GetObjectX(1),GetObjectY(1),GetObjectZ(1)) screen_xx# = GetScreenXFrom3D(GetObjectX(2),GetObjectY(2),GetObjectZ(2)) screen_yy# = GetScreenYFrom3D(GetObjectX(2),GetObjectY(2),GetObjectZ(2)) // draw 2d line connecting the two 3D objects drawline(screen_x#,screen_y#, screen_xx#,screen_yy#,50,255,255) sync() loop