POV-Ray : Newsgroups : povray.binaries.utilities : postscript/pdf to POVRay prism Server Time
29 Apr 2024 22:38:17 EDT (-0400)
  postscript/pdf to POVRay prism (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Ross Martin
Subject: Re: postscript/pdf to POVRay prism
Date: 20 Mar 2003 22:19:35
Message: <3E7A8491.6050801@ross.interwrx.com>
Mark Weyer wrote:
>> I don't
>> need this, but you are certainly welcome to modify the code to do it.
> 
> 
> Can you give me some hint as to which parts of your code I am likely
> to want to change? How does it work anyway? What kind of data do you
> get from pstoedit?
> 

The code works by converting Bezier splines from postscript to povray.
There are two cases it handles: closed Bezier splines that are filled
and non-closed Bezier splines that are stroked.  A closed filled spline
is pretty much the same as what is needed for a POVRay prism, so the
conversion is pretty much copying over the points in the new format.

The stroked path is converted into a prism by considering its width
and approximating the edges of the area that is actually filled.

You'd need to change this code by moving these points "outward".  It
doesn't seem particularly easy, or I'd just do it.  Some approach like
you described earlier should work, if you correctly handle all the
details.

>> It could also be done (less efficiently) by taking the text, moving it
>> back slightly, making it black, and then taking the CSG union of it
>> being moved slightly in different directions.  If you take enough
>> different directions, it would have the effect of enlarging the text
>> into a background for the text as you describe.
> 
> 
> That's what I do now on a bitmap basis. Doing so with vector data
> would lose the latter's benefit of infinite precision.
> 
> 

I don't think you really care about infinite precision for the text
backdrop in the same way you do for the text.  I agree that it's nice,
but I don't see how you achieve this anyway even if you write your
own code.  There will be some approximations involved either way.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.