|
|
On Mon, 26 Feb 2001 16:42:50 -0500, Chris Huff <chr### [at] maccom>
wrote:
>How did you do the folding? Nested unions of triangle objects, or a mesh?
>The only practical way of managing mesh triangles that I can think of
>would be to use declared transformations and the vtransform() function
>in MegaPOV...is this what was done?
Basically,
1. Declare control points in plane
2. Manipulate control points (folding macros based on vaxis_rotate()
and stuff.
3. Declare mesh with triangles composed of control points
The .inc file is in povray.text.scene-files, but I cannot wouch for
it's readability - did a little cleaning up before posting, though.
The folding macros do all the real work. Additionally, there is a
little cheat that applies to two control-points: if they have negative
x-coordinates, their x-coordinates are set to 0 - just to keep the
paper from "tearing".
However, for the past hour I have been thinking of another mehtod:
1. Declare folds (just degrees for each known fold).
2. Declare control points using folds as parameters.
3. Declare mesh with triangles composed of control points.
Kind of neater, I think. Maybe for the next paperfolding thing I
make... I'll have to look into it.
Yours,
-- Nikodemus
Post a reply to this message
|
|