|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
TPainter inflation routinesI have been studying the classes and methods involved in the inflation
of 2D objects into 3D objects that TPainter (and CCPainter!) uses with the aim of trying to eventually optimize the code a bit. I am someday still going to try the alternative method that I described a while back too. In the meantime, I have a couple of simple-minded questions: 1. To better see what was going on in the Form>>#traceOutlines method, I inserted a few lines like "outer asMorph openInWorld." The morphs that came out were on the order of 2 to 3 times bigger on the screen than the original appeared in the viewport. Why is that? 2. In the Form>>#traceOutline:do: method, in order to find a starting point for edge tracing, there is a line that finds the smallest enclosing rectangle for a form followed by a search of the first returned line of that rectangle for the first non-background pixel. There is some extra work being done here somewhere because the smallest enclosing rectangle does not appear to be used anywhere else, and all that really needs to be searched for is the first upper left non-background pixel. The bottom right of the smallest enclosing rectangle is of no concern here, right? Am I missing something here? 3. The literature in this area that I have come across talks about 2 main methods of extracting polygons from an image, edge tracking which is done here, and marching squares. Was marching squares ever tried for TPainter, or is it generally regarded as inferior for some reason? Thanks for any help you can provide. |
|
|
|
|
|
|
|
|
|
| Free Forum Powered by Nabble | Forum Help |