[Fluxus] 'polygon

Kassen signal.automatique at gmail.com
Wed Mar 3 07:52:23 PST 2010


>
>
>
> I don't think so, as you can't build an L shape with 'polygon type.
>
>
I would argue that you can but the burden of proof is on me;

(clear)
(with-primitive
    (build-polygons 6 'polygon)
    (pdata-set! "p" 0 (vector 0 0 0))
    (pdata-set! "p" 1 (vector 2 0 0))
    (pdata-set! "p" 2 (vector 2 1 0))
    (pdata-set! "p" 3 (vector 1 1 0))
    (pdata-set! "p" 4 (vector 1 2 0))
    (pdata-set! "p" 5 (vector 0 2 0))
    (recalc-normals 1)
    (wire-colour 0)
    (line-width 3)
    (hint-wire)

)

You can start at the inner corner too, if you'd like, but not at any other.

I used basically that for the side of my "shop" when I started adapting
stuff to use wireframes and 'triangle-strip wouldn't do any more. I think
you can build any shape S for which there is a point P that is on
the boundary of S and from where a straight line can be drawn to every other
point on this outline without ever crossing the outline.



> Yes, the (hint-wire) lines are drawn with some offset so they don't
> intersect with the solid geometry of the object they belong to. The
> ribbons just get splatted in the middle of this - notice the line inside
> the corner of the L shape is not always visible? That's a problem with
> this approach.
>

Check. And this offset would depend on the line-width? Or is it just some
random very small number?

>
> Who knew wireframe could be so hard! :)
>
>
I'm starting to think that early 3d graphics starting with wire-frames was
as bad a choice as early computer scientists starting with machine language.
Solids are way more convenient and I'm sure mr Turing would have solved that
code a lot faster if he had just started with something a bit more
accessible like maybe Java or Python. No wonder it took them decades to get
anywhere! ;-)

Cheers,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20100303/ae94ef2b/attachment.html>


More information about the Fluxus mailing list