![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Here is a simple demo image of the Lathe Segments Macro WIP (in p.b.s.f).
Here I was able to use a four-segment lathe to create a picture frame in
one go, a six-sided faceted crystal shape, a partial smooth lathe, and a
spaceship using scaled half lathes.
//Dave Dunn - hos### [at] aol com
#local D = union { torus {1,.1 clipped_by {plane {-x,0}}} sphere
{<0,0,1>,.1} sphere {<0,0,-1>,.1} cylinder {<0,0,-1>,<0,0,1>,.1} pigment
{rgb .8} finish {ambient .5 reflection {.5}} rotate x*-90 translate
<-.5,.5,5>} object {D} object {D translate <.5,-1,0>} plane {y,-2 pigment
{checker rgb 1, rgb 0 scale 5} finish {ambient .5}}
Post a reply to this message
Attachments:
Download 'lathe segs.jpg' (35 KB)
Preview of image 'lathe segs.jpg'
![lathe segs.jpg](/povray.binaries.images/attachment/%3Cweb.429096434eee7f71ffb80bcc0%40news.povray.org%3E/lathe%20segs.jpg?ttop=441697&toff=5250&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
It's Dave! How is the ol' AOL POV Chat going? I found your message post(s)
saying you still do that.
Great to see (read) you here. Everytime I think of e-mailing that group of
people there at AOL I get sidetracked and forget to do so. Sure hope your
Winter Holidays went well, etcetera, etcetera. Dang... been such a long
time.
Great macro. Good to know you still have what it takes to work in POV-Ray.
I'm marvelling over the macro just now and already started hacking away at
it to add smoothing in the other direction-- meaning that I put cubic_spline
into the LatheSeg() part. Well, here's that part so you can see it yourself.
I'm having trouble with it so it won't go back to the other way again once
the change is made.
#macro LatheSeg(LatheName,Points,Smooth,Smooth2,XZExt,YExt,Seg,Vis,Color)
union {
#if(Smooth=1)
#declare Lathe_Slice =
lathe {
#if (Smooth2=1)
cubic_spline
Points+2,
#declare Count = -1;
#else
Points,
#declare Count = 0;
#end
#while(Count<=Points)
LatheName(Count)
#declare Count = Count +1;
#end}
Has gotten a little mixed up in the #if or the numbering, I just can't get
beyond that hurdle. If you try this yourself, be sure to include that extra
1 after the Smooth (for the Smooth2)! Any other number just causes an error,
so it would need two separate macros to do both kinds right now.
Gee, so good to know you're still out there. I stopped using POV-Ray for a
month or two, awhile back; computers, too. Not going to any live chats has
made online life boring. I'm just not looking for any live chats anyway, so
pretty much my own fault. Please say a "hi" for me to RENRAD1, CybrJACK, Jim
and whoever else is there at those POV Chats.
Bob Hughes
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Bob Hughes" <bob### [at] charter net> wrote:
> Gee, so good to know you're still out there. I stopped using POV-Ray for a
> month or two, awhile back; computers, too. Not going to any live chats has
> made online life boring. I'm just not looking for any live chats anyway, so
> pretty much my own fault. Please say a "hi" for me to RENRAD1, CybrJACK, Jim
> and whoever else is there at those POV Chats.
>
> Bob Hughes
Hey Bob, glad to see that you are still around the POV forum. The problem,
you may have noticed, is with a "too few points in prism" error when using
cubic_spline in flat segments mode. The smooth option will work with cubic
splines, as long as you double the first and last points (POV purists take
note - this generally works in place of using the third from last and third
points, and is easier to implement). Feel free to make mods to the macro,
as I believe it is something that could be a lot of fun in the right hands.
As for the AOL gang, e-mail me and I will catch you up. -- Dave.
//Dave Dunn - hos### [at] aol com
#local D = union { torus {1,.1 clipped_by {plane {-x,0}}} sphere
{<0,0,1>,.1} sphere {<0,0,-1>,.1} cylinder {<0,0,-1>,<0,0,1>,.1} pigment
{rgb .8} finish {ambient .5 reflection {.5}} rotate x*-90 translate
<-.5,.5,5>} object {D} object {D translate <.5,-1,0>} plane {y,-2 pigment
{checker rgb 1, rgb 0 scale 5} finish {ambient .5}}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
// Before
/*
#local D = union { torus {1,.1 clipped_by {plane {-x,0}}} sphere
{<0,0,1>,.1} sphere {<0,0,-1>,.1} cylinder {<0,0,-1>,<0,0,1>,.1} pigment
{rgb .8} finish {ambient .5 reflection {.5}} rotate x*-90 translate
<-.5,.5,5>} object {D} object {D translate <.5,-1,0>} plane {y,-2 pigment
{checker rgb 1, rgb 0 scale 5} finish {ambient .5}}
*/
// After obfuscation
#macro D(P)union{torus{1,.1clipped_by{plane{-x,0}}}sphere{z,.1}sphere
{-z,.1}cylinder{-z,z,.1}pigment{rgb.8}finish{ambient.5reflection.5}
rotate x*-90translate P}#end D(<-.5,.5,5>)D(<0,-.5,5>)plane{y,-2pigment
{checker rgb 1,0scale 5}finish{ambient.5}}
I believe that it could be shorter. Was thinking on a contest about code
obfuscation, but SDL is already obfuscated PER SE. :-)
B Gimeno
estoeslarealidad
http://usuarios.lycos.es/game2413
light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9
pigment{rgb p}rotate p*90}#end difference{box{-1,1}C
(z,x)C(x,y)C(z,z)pigment{rgb 2}rotate 45 translate z*4}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"B. Gimeno" <no_### [at] ya com> wrote:
> // Before
> /*
> #local D = union { torus {1,.1 clipped_by {plane {-x,0}}} sphere
> {<0,0,1>,.1} sphere {<0,0,-1>,.1} cylinder {<0,0,-1>,<0,0,1>,.1} pigment
> {rgb .8} finish {ambient .5 reflection {.5}} rotate x*-90 translate
> <-.5,.5,5>} object {D} object {D translate <.5,-1,0>} plane {y,-2 pigment
> {checker rgb 1, rgb 0 scale 5} finish {ambient .5}}
> */
> // After obfuscation
> #macro D(P)union{torus{1,.1clipped_by{plane{-x,0}}}sphere{z,.1}sphere
> {-z,.1}cylinder{-z,z,.1}pigment{rgb.8}finish{ambient.5reflection.5}
> rotate x*-90translate P}#end D(<-.5,.5,5>)D(<0,-.5,5>)plane{y,-2pigment
> {checker rgb 1,0scale 5}finish{ambient.5}}
>
> I believe that it could be shorter. Was thinking on a contest about code
> obfuscation, but SDL is already obfuscated PER SE. :-)
> B Gimeno
> estoeslarealidad
> http://usuarios.lycos.es/game2413
> light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9
> pigment{rgb p}rotate p*90}#end difference{box{-1,1}C
> (z,x)C(x,y)C(z,z)pigment{rgb 2}rotate 45 translate z*4}
Thanks for the tune-up to my signature. From my calculations, it saves 43
characters (excluding spaces), and renders in exactly the same amount of
time.
Now I guess I have to update my profile :)
#macro D(P)union{torus{1,.1clipped_by{plane{-x,0}}}sphere{z,.1}sphere
{-z,.1}cylinder{-z,z,.1}pigment{rgb.8}finish{ambient.5reflection.5}
rotate x*-90translate P}#end D(<-.5,.5,5>)D(<0,-.5,5>)plane{y,-2pigment
{checker rgb 1,0scale 5}finish{ambient.5}}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
B. Gimeno wrote:
> ... Was thinking on a contest about code
> obfuscation, but SDL is already obfuscated PER SE. :-)
(Off topic, but...)
Anyone familiar with the IOCCC -- International Obfuscated C Code
Contest? It's been going on for many years, and I just googled to
verify it's still going on.
If you're a C programmer, check out www.ioccc.org
-=- Larry -=-
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Tue, 24 May 2005 16:34:01 +0200, "B. Gimeno" <no_### [at] ya com>
wrote:
> Was thinking on a contest about code
> obfuscation, but SDL is already obfuscated PER SE.
The contest already occured:
ftp://ftp.povray.org/pub/short/
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |