Weird 3D....
- Posted by Patrick Quist <quistnet at HOTMAIL.COM> Apr 17, 1999
- 470 views
Hy, I've coded a sort of 3D-Box maker, Anyone have a better idea than this ? Anyone figure out the 3d graphics in MSET.EX ? I want to have a proc/func that you only have to give the locations of several maintains or something. Like this : Here's that 3d-thing... [3dthng.ex] include graphics.e procedure Box3d(object xy,object size,atom angle,integer color) object coords angle/=10 coords={xy,{xy[1]+size[3],xy[2]+angle*size[1]}} draw_line(color,{coords[1],coords[2]}) draw_line(color,{xy,{xy[1],xy[2]+size[2]}}) draw_line(color,{coords[2],{xy[1]+size[3],coords[2][2]+size[2]}}) draw_line(color,{{xy[1],xy[2]+size[2]},{xy[1]+size[3],coords[2][2] +size[2]}}) draw_line(color,{xy,{xy[1]+size[1],xy[2]}}) draw_line(color,{coords[2],{coords[2][1]+size[1],coords[2][2]}}) draw_line(color,{{xy[1],xy[2]+size[2]},{xy[1]+size[1],xy[2]+size [2]}}) draw_line(color,{{xy[1]+size[3],coords[2][2]+size[2]},{xy[1]+size[3] +size[1],coords[2][2]+size[2]}}) draw_line(color,{{xy[1]+size[1],xy[2]},{xy[1]+size[1],xy[2]+size [2]}}) draw_line(color,{{coords[2][1]+size[1],coords[2][2]},{coords[2][1] +size[1],coords[2][2]+size[2]}}) draw_line(color,{{xy[1]+size[1],xy[2]},{coords[2][1]+size[1],coords [2][2]}}) draw_line(color,{{xy[1]+size[1],xy[2]+size[2]},{coords[2][1]+size [1],coords[2][2]+size[2]}}) end procedure if machine_func(5,261) then end if --(Grph mode(don't try m19)) integer a,x,old_a a=1 x=0 old_a=1 while get_key() !=27 do Box3d({200+old_a,200+old_a},{50,10,100},20+old_a,0) Box3d({200+old_a,200+old_a},{50,10,-100},-20+old_a,0) Box3d({200+a,200+a},{50,10,100},20+a,21+a) Box3d({200+a,200+a},{50,10,-100},-20+a,21+a) old_a=a if x=0 then a+=1 if a=20 then x=1 end if elsif x=1 then a-=1 if a=-20 then x=0 end if end if end while [EOF] Bye, PQ QC ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com