POV-Ray : Newsgroups : povray.general : Asymmetrical scaling Server Time
14 Nov 2024 23:20:43 EST (-0500)
  Asymmetrical scaling (Message 1 to 1 of 1)  
From: Anthony Bennett
Subject: Asymmetrical scaling
Date: 5 Apr 1999 22:39:33
Message: <37095646.85E98BEC@panama.phoenix.net>
I made a little macro to do this. I just thought that I should post it
before someone else has the idea of making it (or have you?).

#macro ascale(obj,XYZ,s1,s2)
 union
 {
  object {obj scale s1 clipped_by {plane { XYZ,0}}}
  object {obj scale s2 clipped_by {plane {-XYZ,0}}}
 }
#end

Usage:
object {ascale(objectname,[x,y,z],size1,size2)}

Example:
#declare Ball = sphere {0,1 pigment {Red}}
object {ascale(Ball,y,<1,1,1>,<1,2,1>)}

Will create an object which is egg-like pointing upwards.

Enjoy.


Post a reply to this message

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