Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

do you know of any software that would help me transform a broken line into a curved line? For example, I have an octagon or a heptagon and I want it to be transformed into something resembling a circle. if you know such software, please, let me know. Thank You!


Update A:

Here is an image from the tutorial given to me by Jamie Keeling (right now it's the first answer below). At least the picture there represents what I want. In that tutorial this process is called "flattening paths". I will try to put that image right here, but if it doesn't get displayed, you can find it by this URL: http://msdn.microsoft.com/en-us/library/ms536364%28v=VS.85%29.aspx The red line in the picture is what I would want to submit, and the blue line is what I would want to get in the end:

alt text

share|improve this question

migrated from stackoverflow.com Apr 7 '10 at 15:49

This question came from our site for professional and enthusiast programmers.

closed as not constructive by random Feb 18 '12 at 4:05

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What language? You haven't said :) –  Chris Dennett Apr 6 '10 at 18:07
2  
How are the broken lines represented? How would a curve be represented? On a computer screen there are no curves - just broken lines ... :) –  Richie Apr 6 '10 at 18:09
    
@ Chris Dennett: Hello Chris! Well, it doesn't really matter what language - I don't want to get into details this time, I just want a piece of software, in which it would be possible to submit some broken lines (by submitting an image or by drawing those broken lines in that software's interface) and make them "less broken", that is "more curved" as I have described. –  brilliant Apr 6 '10 at 23:40
    
@ Richie: Hello Richie! well, it doesn't, really matter how they would be represented. I just want a software, in which I could submit my image with broken lines or draw those broken lines in that software and then trnasform them into curves. –  brilliant Apr 6 '10 at 23:43
    
Comments indicate that OP wants software to do the job, not dev help. Moving to SU. –  Marc Gravell Apr 7 '10 at 15:48

4 Answers 4

up vote 1 down vote accepted

If you were thinking of using C++ (I'm assuming so as you've not specified) you can use the GDI+ system that is present, there's quite a few tutorials on it on MSDN.

You will need to devise your own classes to automatically create a curve though, unless it's included and i've missed it.

Lines, Curves and Shapes in GDI+

share|improve this answer
    
@ Jamie Keeling: Hello Jamie!!! Yes, I think GDI+ is what I need, except I am a little bit afraid of the need of learning a new programming language. However, in that tutorial that You gave me, it seems that flattening paths ( msdn.microsoft.com/en-us/library/ms536364%28v=VS.85%29.aspx ) is what I need.The red line there on the picture is what I would submit, and the blue line is what I would want to get in the end. –  brilliant Apr 6 '10 at 23:56
    
Excellent, i'm glad it's working well for you. I've only used it once or twice to play around with but it's a pretty powerful tool. Maybe you could examine the GraphicsPaths::Flatten method in detail and see how it works, you might be able to reverse it. –  Jamie Keeling Apr 7 '10 at 12:03
    
@ Jamie Keeling: I see. Thanks again! –  brilliant Apr 7 '10 at 16:20

I'm not totally sure I understand your question correctly, please let me know if this isn't what you meant.

You could do this with Photoshop. Invidivually, you could

  1. select edges
  2. feather the selection
  3. stroke or fill the result

I would imagine this is possible for multiple shapes using Photoshop Scripting.

share|improve this answer
    
@ Lord Torgamus: Hello Lord!!! Thank you very much for these instructions. I will try doing it in Photoshop. Do You think the same would be possible in PhotoImpact? Also, please refer to "Update A" in my question (above) to see what I meant to say. I think this process is called "flattening paths". Is it what You are suggesting? –  brilliant Apr 7 '10 at 0:09

Is implementing an algorithm an option? http://www.springerlink.com/content/q0j18363g8424436/

share|improve this answer
    
@ tixxit: Hello tixxit!!! Is what you are suggesting just mathematical formulas or a kind of tutorial for some software. I an afraid it's the first. However, I just need some softawre that could do it. –  brilliant Apr 7 '10 at 0:14

What about using Splines?

Splines are a mathematical means of representing a curve, by specifying a series of points at intervals along the curve and defining a function that allows additional points within an interval to be calculated. There are various functions available to approximate a curve, but in this article we will focus on a variety of spline known as the Catmull-Rom spline.

share|improve this answer
    
@ Mike Daniels: Hello Mike!!! Yes, it looks like it is what I really need (please, refer to "Update A" section in my question). But what software is it? Where can I download it from? –  brilliant Apr 7 '10 at 0:18
    
@brilliant, This is a programming question and answer site.. I assumed you needed an algorithm to implement! I don't know of software that does this specifically. –  Mike Daniels Apr 7 '10 at 0:34
    
@ Mike Daniels: Yes, Mike, I understand that. However, your suggestion to use splines is quite useful. I think I will go this way. Thank You. –  brilliant Apr 7 '10 at 1:26
    
Don't settle for inferior splines; they should be reticulating or better. –  Pops Apr 7 '10 at 13:52
    
@ Lord Torgamus: Okay, thanks for this advice. –  brilliant Apr 7 '10 at 16:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.