help-3dldf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-3dldf] How to z-sort the polygons of a cuboid using with_focus


From: Laurence Finston
Subject: Re: [help-3dldf] How to z-sort the polygons of a cuboid using with_focus
Date: Tue, 13 Mar 2007 22:07:58 +0100 (CET)

Hello Per,

> Hi guys! I just started using this cool program for my master's thesis
> report. Need a little help:
> 

Thanks, I'm glad you like it.

I have to leave very soon to catch my bus, but I just want to give you a 
quick answer first.  I'll explain in detail tomorrow.  

Sorting isn't probably not going to work.  The only way to do what you 
want is to fill the faces individually.  This isn't very satisfactory if 
you're making an animation with many images.  The reasons why sorting 
alone won't work are documented in the manual.  

I would like nothing better than to implement proper surface hiding, but 
it's not possible at the moment.

Will get back to you.

Laurence


On Tue, 13 Mar 2007, scientist47 wrote:

> Hi guys! I just started using this cool program for my master's thesis
> report. Need a little help:
> 
> I have managed to filldraw the cuboid and other solid shapes with
> 
> output save_picture with_projection parallel_x_z;
> 
> but when I use
> 
> output save_picture with_focus f;
> 
> or
> 
> output save_picture with_focus f with_surface_hiding mean_z_sort;
> 
> the surfaces are not sorted, or sorted incorrectly - I'm not sure which.
> 
> I use the 1.2.0.0 snapshot version from 3DLDFsnp.tar.gz.
> 
> 
> Per
> 
> ldf file source follows:
> 
> ---------------------------------------------------------
> 
> verbatim_metapost "verbatimtex \magnification=\magstep3 etex";
> 
> picture axis_picture;
> picture save_picture;
> 
> point axis_pt[];
> 
> focus f;
> set f with_position (10, -5, 2)
>        with_direction (0, 2, 0)
>        with_distance 100;
> 
> pickup pencircle scaled (.5mm, .5mm);
> 
> axis_y_rt    := 1;
> axis_z_top   := 1;
> axis_x_front := 1;
> 
> axis_pt0 := (axis_y_rt, 0, 0);
> axis_pt1 := (0, axis_z_top, 0);
> axis_pt2 := (0, 0, -axis_x_front);
> 
> drawarrow origin -- axis_pt0 on_picture axis_picture;
> drawarrow origin -- axis_pt1 on_picture axis_picture;
> drawarrow origin -- axis_pt2 on_picture axis_picture;
> 
> label.bot("y", axis_pt0) axis_picture;
> label.rt("z", axis_pt1) axis_picture;
> label.lft("x", axis_pt2) axis_picture;
> 
> pickup pencircle scaled (.1mm, .1mm);
> 
> beginfig(0);
> 
> %polyhedron c;
> %c := unit_icosahedron scaled 0.6;
> cuboid c;
> c := unit_cuboid;
> 
> filldraw c with_draw_color blue with_fill_color green;
> show c;
> 
> save_picture := current_picture;
> 
> clear current_picture;
> 
> output save_picture with_projection parallel_x_z;
> output save_picture with_focus f with_surface_hiding mean_z_sort;
> output axis_picture with_focus f;
> endfig with_focus f;
> 
> verbatim_metapost "end";
> 
> end;
> 
> 
> _______________________________________________
> help-3dldf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-3dldf
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]