POV-Ray : Newsgroups : povray.advanced-users : next step (long and perhaps nothing interesting) : next step (long and perhaps nothing interesting) Server Time
29 Jul 2024 22:20:49 EDT (-0400)
  next step (long and perhaps nothing interesting)  
From: Wlodzimierz ABX Skiba
Date: 16 Nov 2000 20:47:26
Message: <3a148e2e$1@news.povray.org>
I'm worry that my english is poor for explain my imagination but I try
write this little story with http://www.ectaco.com/online/. I write to
two groups, if you want continue only in one, just cut second, please.

I. Introduction

   Looking at quadric I see very complicated equation. I know math, than
I can (hardly) simulate this on paper. Then I can simple discover that
there are some special quadrics such sphere, cone, cylinder. They have
special routines for calculate normals but still are quadric. They have
own parameters like radius, coordinates instead of set of factors.
   I know that most povers know this example of specialization. In this
post I want propose another specialization in povray. I'am talking about
interested specialization of some isosurfaces/isofunctions. Or rather
barrow technic from isosurface with special functions to new technic in
POV-Ray.

II. Looking at isosurfaces

   Using isosurface we can describe interior of object. We can displace
its surface with noise or patterns. But we can also do something more.
We can convert coordinates from one geometry to another. For example we
can convert
     box { <-1,-1,-1> <1,1,1> }
exactly to
     cone { <0,0,0> 1 <1,1,1> 0 }
As exactly converted objects I mean that every point from one has its
own corresponding point in second object. Usually there are some special
points (top of cone) which isn't, but we can enumerate such special
points. You can ask how can we convert box to cone or cone to box. Just
this way:
     box: <x,y,z>
     P=<x,0,z>
     l=vlength(P)
     lmax=min(length(P/x),length(P/z)) // forget 0
     r=(1-y)/2
     P=r*P/lmax
     cone: <P.x,1-r,P.z>
but this conversion is not main subject, this is only example. Another
example is my post "is over iso vers." from 8:11:2000 9:20 sended as
picture to p.b.i - there is object of twenty isosurfaces
"Witch_of_Agnesi" along y, all enclosed in
     cylinder { <0,0,0> <0,1,0> 1 }
and displaced along family of parabols. This way we can achive plants or
opened skin of bananas or something similiar. Showed displacements are
only prepared for fun but I can imagine such function which describe
displacements from physics: twister, bender, strecher, curver, mirage
(non regular waves like hot air over desert). They are non-linear
transformations, right ?

III. Inherit something

   From isosurfaces we can inherit method of searching first point of
ray and calculate normal but instead of searching equipotential surface
of f=0 this should find border between inside and outside. And for every
calculated point this should return all texture properities: finish,
pigment, normal, ior etc.
   Instead of toilsome calculation for every isosurface with
displacements supported by POV, we can put modificator (non-linear
transformation) to prepared objects - csg, primitives, another
isosurfaces. We should control this with specialized parameters - in
strecher we can put factor for material and force; in curver we bound
base object with cylinder and put this cylinder proportional along
spline. The rest belongs to parser - enclose parts with different
displacements rules and calculate proper factors for functions. From
syntax of isosurfaces we can also inherit "accuracy" and other
parameters if there is no way to calculate.

IV. Syntax

   I don't know how this can be putted in POV's language. Perhaps:

  #declare MyObject=object{
    union { box{} intersection { .. } .. }
    scale, translate, rotate
    non-linear {
      type /* bender, twister, etc. */
      syntax_proper_for_type
    }
  }

or maybe this way:

  #declare MyObject=modificator{
    object { MyBaseObject }
    type /* bender, twister, etc. */
    syntax_proper_for_type
  }

or meybe completly different.

V. To do

   I don't think that my idea is great. There is many to discuss.
Perhaps this is imposible or perhaps possible but completly different. I
only want to inspire. I'm programmer but I think I'm not proper person
to do this stuff. First of all I have a lot to do in my company and I
have some web sites to care about and update. Even for my first planned
patch I have no time. But I want to inspire somebody to play with
sources (I think after 3.5). There shouldn't be to much to do: structure
with pointer to function and table of factors and technic to return
texture properities. Than all displacement can be supported by parser.
But it is always simple to say...

thanks for reading

ABX


Post a reply to this message

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