Re: [Flashcoders] Equidistant points on an ellipse!
neater, faster and a couple of comments... http://www.pixelassembly.com/testing/ellispeSegs2.swf http://www.pixelassembly.com/testing/ellispeSegs2.fla you can suffix the url with "?segs=n" (n is a number of course) glenn On 14/05/2006, at 12:50 AM, Ron Wheeler wrote: Not that hard on CPU. It only got to 63% on my old 1 GHz Windows PC. Ron Glenn Mitchell wrote: Hi again, got distracted by this last night, here is some VERY messy code to dash a line on an elipse ummm, there's no comments there either ... but I'll rewrite it with comments if anyone's interested :) (the angular segments are also shown for reference) it's a CPU hog, probably not good at all for anything animated, but if you're just creating static images ... http://www.pixelassembly.com/testing/ellispeSegs.swf http://www.pixelassembly.com/testing/ellispeSegs.fla cheers, glenn On 11/05/2006, at 11:49 AM, pixelassembly wrote: Hi, just to clarify, are you trying to get the "equal sided polygon" into your elipse, or are you wanting the points "equal distance along the circumfrence" ? also why are you not getting accurate results when using a large point set ? a) you need a crazy level of accuracy ? b) the maths doesn't quite work ? with a large point set, are you calculating the cumulative distance (point to point around the circumference) or the direct distance between points (for an equal sided polygon) sorry, no answers, only questions :) glenn - Original Message - From: "Peter Gehring" <[EMAIL PROTECTED]> To: Sent: Thursday, May 11, 2006 4:31 AM Subject: [Flashcoders] Equidistant points on an ellipse! I'm really hoping someone can help... I need to plot points at an equal distance along the circumfrence of an Ellipse. As it turns out, I'm pretty bad at geometry, which doesn't help. I can plot the ellipse, but because I'm using sine/cos and incrementing with theta the points are crunched towards the outside of the major radius. I've tried a bunch of different approaches- recording lots (5000) of points, then stepping through each to compare actual distance but I'm not getting nearly accurate results this way. I've looked at drawing dotted/dashed curves from drawing api/ custom classes but no luck. If I could affect theta at the same rate the ellipse is plotted I think I'd be ok, but I can't quite grasp it. I've read all sorts of impossiblilites about this,and a lot of people having miserable experience with this sort of thing (one guy spent 8 years trying to fit an equal-sided polygon in to an ellipse). But- at the end of the day I can go to the Flash IDE and draw an ellipse and stroke it with an equally spaced dotted line! I just need to do this dynamically and record the points... Any thoughts? Thanks much, Peter [sorry if this is a duplicate] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Equidistant points on an ellipse!
Hi again, got distracted by this last night, here is some VERY messy code to dash a line on an elipse ummm, there's no comments there either ... but I'll rewrite it with comments if anyone's interested :) (the angular segments are also shown for reference) it's a CPU hog, probably not good at all for anything animated, but if you're just creating static images ... http://www.pixelassembly.com/testing/ellispeSegs.swf http://www.pixelassembly.com/testing/ellispeSegs.fla cheers, glenn On 11/05/2006, at 11:49 AM, pixelassembly wrote: Hi, just to clarify, are you trying to get the "equal sided polygon" into your elipse, or are you wanting the points "equal distance along the circumfrence" ? also why are you not getting accurate results when using a large point set ? a) you need a crazy level of accuracy ? b) the maths doesn't quite work ? with a large point set, are you calculating the cumulative distance (point to point around the circumference) or the direct distance between points (for an equal sided polygon) sorry, no answers, only questions :) glenn - Original Message - From: "Peter Gehring" <[EMAIL PROTECTED]> To: Sent: Thursday, May 11, 2006 4:31 AM Subject: [Flashcoders] Equidistant points on an ellipse! I'm really hoping someone can help... I need to plot points at an equal distance along the circumfrence of an Ellipse. As it turns out, I'm pretty bad at geometry, which doesn't help. I can plot the ellipse, but because I'm using sine/cos and incrementing with theta the points are crunched towards the outside of the major radius. I've tried a bunch of different approaches- recording lots (5000) of points, then stepping through each to compare actual distance but I'm not getting nearly accurate results this way. I've looked at drawing dotted/dashed curves from drawing api/custom classes but no luck. If I could affect theta at the same rate the ellipse is plotted I think I'd be ok, but I can't quite grasp it. I've read all sorts of impossiblilites about this,and a lot of people having miserable experience with this sort of thing (one guy spent 8 years trying to fit an equal-sided polygon in to an ellipse). But- at the end of the day I can go to the Flash IDE and draw an ellipse and stroke it with an equally spaced dotted line! I just need to do this dynamically and record the points... Any thoughts? Thanks much, Peter [sorry if this is a duplicate] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Saving images server-side...
Hi, maybe I'm misunderstanding, but are you just marquee-ing an existing image, cropping and resizing ? or is there more manipulation going on ? when I first read your post, I thought that maybe you dont need to send any image data back to the server at all ? just a reference to the original image and the cropping resizing data ... then just process it with gdlib or similar but, I'm prbably wrong :) glenn On 11/05/2006, at 8:04 AM, ryanm wrote: I know we've been through this and the answer is always "you'll have to send it to a server-side script", but has anyone come up with a usable solution to modifying bitmap data and then resaving it over the web? I'm in a .NET envornment, using AS2/Flash 8, and I need to make thumbnails out of larger pictures (with user interaction), and then save them back to the server. I wrote an RLE class a while back, but it seems like there should be a more efficient way. Has anyone implemented anything that is fast enough to be usable in a business enviornment? Freebie code would be great, but even hints as to how such a thing was implemented in a usable fashion would be just as good. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com