To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.ideasOpen lugnet.cad.dat.ideas in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Ideas / 216
215  |  217
Subject: 
Re: non-lego rendering using various LDraw tools
Newsgroups: 
lugnet.cad.dat.ideas
Date: 
Thu, 23 Sep 2004 18:55:30 GMT
Viewed: 
4456 times
  
In lugnet.cad.dat.ideas, Steve Bliss wrote:
   In lugnet.cad.dat.ideas, Don Heyse wrote: Yep, thanks for doing that. Then I turned around and installed Cygwin, so now I probably have gcc available -- I think.

I’d imagine so. I don’t actually use Cygwin. I use the mingw version of gcc on Windows because I don’t want to worry about the Cygwin unix compatibility DLL.

   Ha. Once you’ve got vertices and edges, writing the Triangle format is pretty straightforward. The only tricky bit (and one I did not solve) is telling Triangle the location of ‘holes’. If you have open spaces in your image, you have to tell Triangle, or it will happily pave over them.

It’s not too hard to detect holes while you’re vectorizing edges, just look at the pixel color above the highest point on each closed polyline. You can encode this by writing outside edges clockwise and inside edges counter-clockwise. I don’t remember if autotrace can do this. I’ll have to check.

   I’ll happily share what I’ve done, especially if I ever finish it. But (working with Autotrace) you were probably were ahead of what I accomplished. But I’d be interested in looking at your code. :)

The autotrace source code for LDR output from May is here. I put the executable here, but I don’t remember how to run it. There’s a batch file I used to test it in the source zip file, but that might not have all the right options for a real world example.

Don



Message has 1 Reply:
  Re: non-lego rendering using various LDraw tools
 
(...) Err, reverse course. I peeked at the autotrace source and it says in pxl-outline.c "Outside outlines are traced counterclockwise". So if you want to make things easier for me, do it that way. ;^) (...) (20 years ago, 23-Sep-04, to lugnet.cad.dat.ideas, FTX)

Message is in Reply To:
  Re: non-lego rendering using various LDraw tools
 
(...) Yep, thanks for doing that. Then I turned around and installed Cygwin, so now I probably have gcc available -- I think. (...) Heh. Yeah, considering how raw my edge-construction code is, a few small math errors wouldn't be noticeable. And the (...) (20 years ago, 23-Sep-04, to lugnet.cad.dat.ideas, FTX)

8 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR