POV-Ray : Newsgroups : povray.binaries.scene-files : CSG Fonts - A New Idea? : Re: CSG Fonts - A New Idea? Server Time
1 Sep 2024 12:21:24 EDT (-0400)
  Re: CSG Fonts - A New Idea?  
From: nemesis
Date: 1 Dec 2006 05:50:00
Message: <web.457007bdeaed41c03976a8750@news.povray.org>
"Randall Sawyer" <sra### [at] yahoocom> wrote:
> But, I did get the results I was
> looking for by making my own CSG letters.

CSG fonts are a long time povray tradition. :)  see the recent warp's yes/no
thread...

I've played with it a bit.  It says: "Generates a CSG font out of spheres,
cylinders, tori and sphere_sweeps.".  I wonder if it would be easier to
just use the sphere sweeps and specify spline points for the letters
shapes?

I've also changed the csg_text as follows, and it works just fine, even for
empty strings -- returns an empty union -- or single letters... the #if
looked kinda redundant...

#macro csg_text( csg_font, font_widths, string )
    #local len = strlen( string );
        #local tr = 0;
        #local i = 0;
        union {
        #while ( i < strlen(string) )
            #local next = asc(substr(string,i+1,1))-32;
            object {
                csg_font[ next ]
                translate tr*x
            }
            #local tr = tr + font_widths[ next ];
            #local i = i + 1;
        #end//while
        }
#end//macro


Post a reply to this message

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