What's the simplest way? I'm trying drawcurve, but it appears to draw it smaller than the radius I wanted. -Chuckk
yeah i wondered this too. a circular data structure would be good.
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
What's the simplest way? I'm trying drawcurve, but it appears to draw it smaller than the radius I wanted.
Without seeing your patch, nobody can tell what's wrong with it.
Anyways I attached a circle which is ripped from Miller's scaling example. In its current form it uses features only available in pd-0.39, however the basic approach works for older Pds as well. You just draw a stopping sign, then let the curves of drawcurve/filledcurve transform it into (almost?) a circle.
Frank Barknecht _ ______footils.org_ __goto10.org__
I thought so. The points fed to Pd aren't actually on the circle it draws. w isn't really the radius.
I changed a few things to show it.
-Chuckk
On 5/25/06, Frank Barknecht fbar@footils.org wrote:
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
What's the simplest way? I'm trying drawcurve, but it appears to draw it smaller than the radius I wanted.
Without seeing your patch, nobody can tell what's wrong with it.
Anyways I attached a circle which is ripped from Miller's scaling example. In its current form it uses features only available in pd-0.39, however the basic approach works for older Pds as well. You just draw a stopping sign, then let the curves of drawcurve/filledcurve transform it into (almost?) a circle.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
I thought so. The points fed to Pd aren't actually on the circle it draws. w isn't really the radius.
I changed a few things to show it.
Yes, see my other mail: the w-field is 0.92 of the real radius. That's simply because Miller and me are lazy when calculating sines and cosines.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
I thought so. The points fed to Pd aren't actually on the circle it draws. w isn't really the radius.
I changed a few things to show it.
Yes, see my other mail: the w-field is 0.92 of the real radius. That's simply because Miller and me are lazy when calculating sines and cosines.
I changed more things to show it.
Frank Barknecht _ ______footils.org_ __goto10.org__
But your curve and your polygon still have the exact same plotting points, and those points aren't on the curve.
On 5/25/06, Frank Barknecht fbar@footils.org wrote:
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
I thought so. The points fed to Pd aren't actually on the circle it draws. w isn't really the radius.
I changed a few things to show it.
Yes, see my other mail: the w-field is 0.92 of the real radius. That's simply because Miller and me are lazy when calculating sines and cosines.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
But your curve and your polygon still have the exact same plotting points, and those points aren't on the curve.
Well, that's how curves are drawn with data structures: they are inside of the points used to specify their vertices.
Frank Barknecht _ ______footils.org_ __goto10.org__
On Thu, May 25, 2006 at 03:07:37PM +0200, Frank Barknecht wrote:
Hallo, Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
But your curve and your polygon still have the exact same plotting points, and those points aren't on the curve.
Well, that's how curves are drawn with data structures: they are inside of the points used to specify their vertices.
It would be cool though if there was a [drawarc] as someone suggested. Then we could re-implement knob with datastructures.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Anyways I attached a circle which is ripped from Miller's scaling example. In its current form it uses features only available in pd-0.39, however the basic approach works for older Pds as well. You just draw a stopping sign, then let the curves of drawcurve/filledcurve transform it into (almost?) a circle.
I forgot to add: The numberbox labelled "radius" is not used to input the actual radius although with a different scaling it can be made to do so.
For simplicity it is scaled by cos(360°/16) which is about 0.92, and sin(360°/16) (about 0.38), which explains the 38 and 92 inside the data structure definition.
Frank Barknecht _ ______footils.org_ __goto10.org__
This here is pretty close on a smaller circle, but here it is with radius 200. This is close enough for my purposes. I know there are reasons people would want drawcurve to curve around the points fed to it, but for drawing a circle of a certain radius, it would be better if it forced the curve to use those points. Unless I'm doing something totally wrong.
-Chuckk
On 5/25/06, Frank Barknecht fbar@footils.org wrote:
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Anyways I attached a circle which is ripped from Miller's scaling example. In its current form it uses features only available in pd-0.39, however the basic approach works for older Pds as well. You just draw a stopping sign, then let the curves of drawcurve/filledcurve transform it into (almost?) a circle.
I forgot to add: The numberbox labelled "radius" is not used to input the actual radius although with a different scaling it can be made to do so.
For simplicity it is scaled by cos(360°/16) which is about 0.92, and sin(360°/16) (about 0.38), which explains the 38 and 92 inside the data structure definition.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
I posted something similar about two weeks ago (with a patch), if you make a 'drawcurve struct' it is inscribed inside the equivalent 'drawpolygon struct'. So, for example, if you are using the 4 points on the compass those define a 45° rotated square area into which the 'circle' is inscribed (if you make a drawpolygon with the same information as your drawcurve you will see). The more points you define the better the 'circle' (which isn't really) is drawn.
It would be good/accurate to have a 'drawarc' with r, theta as variables.
Tiscali Broadband from 14.99 with free setup! http://www.tiscali.co.uk/products/broadband/