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
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@gmail.com To: pd-list@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Whoa, this is great! Thanks Jonathan!
Wouldn't adding the "-c" flag make a curved shape between each point?
On Sun, Oct 2, 2011 at 4:08 PM, Jonathan Wilkes jancsika@yahoo.com wrote:
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@gmail.com *To:* pd-list@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
The documentation says you can specify a bezier curve with the first argument as "curve". But you're
right, you can also specify a curve by using the "-c" flag, which is much more logical.
I think using "curve" should be deprecated, for the obvious ambiguity that flags solve.
Miller?
-Jonathan
From: Scott McCoid mccoid.scott@gmail.com To: Jonathan Wilkes jancsika@yahoo.com Cc: "pd-list@iem.at" pd-list@iem.at Sent: Sunday, October 2, 2011 4:18 PM Subject: Re: [PD] Data structure array with last element pointing back to first element
Whoa, this is great! Thanks Jonathan!
Wouldn't adding the "-c" flag make a curved shape between each point?
On Sun, Oct 2, 2011 at 4:08 PM, Jonathan Wilkes jancsika@yahoo.com wrote:
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@gmail.com To: pd-list@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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
wouldn't it be simpler to compare the value of the 1st point with the last
one, without creating the new variables? it's too late now, can't give a
concrete example.
or, this is a situation where a "change" identifier for arrays would come
in very handy (which already exists for loose pointers). then the metro
hack wouldn't be necessary.
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.]
-c is the same as curve, right? an extra parameter for the stepness of the
bezier would also be nice
João
The 1st circle is under the 2nd, and Pd currently registers a click with the object at the bottom. But is that a feature or a bug? Either way, if it's implementation specific it then writing the patch as you suggest would work correctly under one implementation
while it wouldn't the move the circle at all under the other.
-Jonathan
From: João Pais jmmmpais@googlemail.com To: Scott McCoid mccoid.scott@gmail.com; "pd-list@iem.at" pd-list@iem.at; Jonathan Wilkes jancsika@yahoo.com Sent: Sunday, October 2, 2011 8:48 PM Subject: Re: [PD] Data structure array with last element pointing back to first element
wouldn't it be simpler to compare the value of the 1st point with the last one, without creating the new variables? it's too late now, can't give a concrete example.
or, this is a situation where a "change" identifier for arrays would come in very handy (which already exists for loose pointers). then the metro hack wouldn't be necessary.
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.]
-c is the same as curve, right? an extra parameter for the stepness of the bezier would also be nice
João
The 1st circle is under the 2nd,
you mean, under the last one? (which makes sense, since they're drawn in
creation order)
and Pd currently registers a click with the object at the bottom. But
is that a feature or a bug?
you mean the print coming from the vertex struct, giving the individual y
values of each scalar in the array? that's a bit strange, never seen it.
trying to adapt plot's help file doesn't replicate the behavior as well.
Either way, if it's implementation specific it then writing the patch as
you suggest would work correctly under one implementationwhile it wouldn't the move the circle at all under the other.
hmm, am not really understanding what you mean. but I have to work on
something else right now, can't do much more for the time being.
João
From: João Pais jmmmpais@googlemail.com To: Scott McCoid mccoid.scott@gmail.com; "pd-list@iem.at"
pd-list@iem.at; Jonathan Wilkes jancsika@yahoo.com Sent: Sunday, October 2, 2011 8:48 PM Subject: Re: [PD] Data structure array with last element pointing back
to first elementwouldn't it be simpler to compare the value of the 1st point with the
last one, without creating the new variables? it's too late now, can't
give a concrete example.or, this is a situation where a "change" identifier for arrays would
come in very handy (which already exists for loose pointers). then the
metro hack wouldn't be necessary.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.]
-c is the same as curve, right? an extra parameter for the stepness of
the bezier would also be niceJoão
Hi all,just a question...say I have an array for an audio file. I get looped audio from it with a tabread4~ object. Now I would like to inject (mix, replace, whatever) audio into it at the same precise sample location I just extracted audio from, if that makes any sense, as tabread4~ interpolates between some samples ...What would be the best approach for that to be as much precise as possible? I wish there was a tabwrite~ with audiorate phase input...any other suitable object for that? Many thanks in advance,Josep M