
On Thu, Oct 19, 2006 at 12:28:54PM -0500, Aaron Spike wrote:
Paul Elliott wrote:
But since you can draw, you can draw the Mona Lisa.
Whoa.
All I am really asking for is the transformation.
I can draw all the perspective lines I need to determine the transformation on an invisible layer that I erase later.
Let me have a rectangle, and let me say that the four corners of the rectangle now map to these four courners of a rombus, let the computer figure out how to move the other points.
This is the kind of calculation computers were designed to do.
From there, I can figure out the rest.
Ok. You don't draw. But can you program? (If I had to guess I'd say you are a C++ kinda guy.) I spent some time trying to write an extension to do perspective transforms a while back and I failed. The result of that experiment is in the Effects menu (labeled either "Summer's Night" or "Envelope"). The envelope effect is not a true perspective distortion. If you would be interested in helping me with the math (I've still got the code for my two or three other failed attempts around somewhere), maybe we could get something clunky worked out in python. If you are really interested I had embarked upon a different more betterer path and under the guidance of bbyak I had planned to develop some sort of live effects mechanism in Inkscape proper (C++). This would be really really cool. Would you like to give me a hand with this effort?
Aaron Spike
First, I am not sure if Modify Path that has been discussed on this thread is the solution. Some comments seem to say it is not the true solution. I will have to test it.
If it is the solution, all that needs to be done is document it better so that idiots like myself can deterime how to use it to do their perspective work.
But if it turns out that new code is really needed, I would suggest never write new code if you can steal it from elsewhere. That it what code reuse is all about.
Are there any other open source/free software projects that use this kind of transformation with bitmaps? If there are, lets steal their code! Open software licenses allow code to be copied into other open projects.
Good software developers imitate. Great ones steal.
If not, we should look in books. Ideas are not copyrightable. This math is very old. It should be laid out somewhere.
If it turns out code is needed, it will take me a long time to get up to speed. Although, I know C++, I am not familiar with this area of expertise. I would have to study the source for a long time just to begin.