[PD] Data structure array with last element pointing back to first element

Jonathan Wilkes jancsika at yahoo.com
Sun Oct 2 22:08:33 CEST 2011


Here's a quick hack-- didn't check it for bugs.

The real solution would be to add a "-c" flag to [plot] to draw the trace back to element 0:

[plot -c etc.]

And maybe "-f COLOR" to draw the trace back to element 0 and fill the inside.
(Although that word probably be a bigger change.)

-Jonathan




>________________________________
>From: Scott McCoid <mccoid.scott at gmail.com>
>To: pd-list at iem.at
>Sent: Sunday, October 2, 2011 2:13 PM
>Subject: [PD] Data structure array with last element pointing back to first element
>
>
>Hi, 
>
>
>I've recently started playing around with Pd's data structures, and I need some help. It's relatively straightforward to create polygons and arrays of polygons. Though, I'd like to create a closed polygon, where each vertex is another data structure. I've attached a patch of what I have so far. 
>
>
>I basically just want there to be another line to connect the 4th element of the array back to the first.
>
>
>Is it possible to use a [drawpolygon] object where each of the corners would be another data structure? 
>
>
>Thanks!
>
>
>Scott
>_______________________________________________
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111002/7c3242f1/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shape-datastruct.pd
Type: application/octet-stream
Size: 3494 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111002/7c3242f1/attachment-0001.obj>


More information about the Pd-list mailing list