Skip to main content

Smoothing out curves from the mouse

3 replies [Last post]
mickleness
Offline
Joined: 2005-07-14

It's a little hard to explain this in words, so I made an animation that demonstrates what I'm talking about:

http://homepage.mac.com/tech4learning/vectorizer.GIF

We have paint tools that paint the strokes the user makes with the mouse. If we literally record each mouse point and create a polygon from the path the mouse makes, the resulting path is ugly. I'm interested in ironing out that path.

We have a mechanism that currently achieves this. It's called a Vectorizer. (We made up the name.) But it's a little sluggish: it can't respond in real-time very well. (Especially if the path gets complex.)

Also I'd just be interested in seeing how other people approached this problem. Is there a body of work on this subject?

I don't even know the right jargon to use here; what is the correct name for the thing I'm looking for? (If I at least knew that then Google might be able to help me more...)

Any comments would be welcome.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
TOULA Michael

Mickleness,

What you are looking for is in the first Graphics Gems book (page 579).
The article is called "Explicit cubic spline interpolation formulas"
and explains just that.

Hope this helps,
Mike

On 8 janv. 08, at 21:14, java2d@JAVADESKTOP.ORG wrote:

> It's a little hard to explain this in words, so I made an animation
> that demonstrates what I'm talking about:
>
> http://homepage.mac.com/tech4learning/vectorizer.GIF
>
> We have paint tools that paint the strokes the user makes with the
> mouse. If we literally record each mouse point and create a
> polygon from the path the mouse makes, the resulting path is ugly.
> I'm interested in ironing out that path.
>
> We have a mechanism that currently achieves this. It's called a
> Vectorizer. (We made up the name.) But it's a little sluggish: it
> can't respond in real-time very well. (Especially if the path gets
> complex.)
>
> Also I'd just be interested in seeing how other people approached
> this problem. Is there a body of work on this subject?
>
> I don't even know the right jargon to use here; what is the correct
> name for the thing I'm looking for? (If I at least knew that then
> Google might be able to help me more...)
>
> Any comments would be welcome.
> [Message sent by forum member 'mickleness' (mickleness)]
>
> http://forums.java.net/jive/thread.jspa?messageID=252803
>
> ======================================================================
> =====
> To unsubscribe, send email to listserv@java.sun.com and include in
> the body
> of the message "signoff JAVA2D-INTEREST". For general help, send
> email to
> listserv@java.sun.com and include in the body of the message "help".

******************************************
Michael TOULA
Software Engineer

Dalim Software GmbH
Strassburger Str. 6
D-77694
Kehl am Rhein
GERMANY

tel: +49 7851 919 612
fax: +49 7851 735 76
web: www.dalim.com
**************************************************************
Dalim Software’s mission is the continued development of innovative
solutions that greater facilitate the production workflow throughput
of media communications companies.
Geschäftsführer (CEO): Dr. Carol Werlé Vorsitzender des
Aufsichtsrats (Chairman): Jim D. Salmon
Ust-IdNr. (VAT-Nr.): DE 195 290 616 Sitz der Gesellschaft
(Location): Kehl, Amtsgericht Freiburg, HRB 371620

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

gmiecznik
Offline
Joined: 2007-11-07

Mickleness

Have you been able to get a code example for your interpolation?

I am in the same boat, and cannot find any description/code useful
for rapid prototying.

Thank you
Gregory

jxc
Offline
Joined: 2005-02-24