POV-Ray : Newsgroups : povray.binaries.images : Egg shape formula : Re: Egg shape formula Server Time
19 Apr 2024 04:28:20 EDT (-0400)
  Re: Egg shape formula  
From: BayashiPascal
Date: 29 Apr 2022 12:15:00
Message: <web.626c0e0d29797c867808302a1749e915@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "BayashiPascal" <inf### [at] baillehachepascaldev> wrote:
> >
> > I did it as a
> > macro in an include file so that anyone interested could reuse it easily.
> > The macro and explanation about it are available on my website:
>
> Nicely done!
>
> Your explanation of the idea is very clear, and the comments in the code are
> very useful. I shall refer to this in the future.
>
> From your image, it appears that the various textures are uv-mapped onto the
> eggs(?)-- but there is no uv_mapping in your code that I can find. Do you think
> that your macro could make use of v3.8's 'lemon' or 'ovus' uv_mapping ability? I
> have not yet used those features, so I do not know where the appropriate code
> should be placed in your macro, or if it would work there.

No uv_mapping here. The textures you see in the image are generated by the
'EggRndTexture' macro in 'egg.inc'. This is a multi-layered 'texture {pigment
{bozo ...}}'.
The shape is a lathe, see the macro 'EggShape' macro in 'egg.inc', not a lemon
or ovus. Then, uv_mapping would be possible if using the 'lathe' mapping. For
example as follow:

object {
  EggRndShape(lengthEgg, radiusEgg, seedShape)
  texture {
    uv_mapping
    pigment {
      image_map { png "img.png" }
    }
    scale <1,lengthEgg,1>
  }
}

In 'img.png', the top-down axis corresponds to the small end-big end axis, and
the left-right axis warps around the egg. Note that I haven't tried and I'm
writing this only by referring to the doc.

Regards,
Pascal


Post a reply to this message

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