POV-Ray : Newsgroups : povray.binaries.images : Can we join together to make a baseball? : Re: Can we join together to make a baseball? Server Time
7 Aug 2024 15:16:15 EDT (-0400)
  Re: Can we join together to make a baseball?  
From: Jim Charter
Date: 18 Apr 2006 11:06:41
Message: <44450081@news.povray.org>
wayne461 wrote:
> Jim Charter <jrc### [at] msncom> wrote:
> 
> 
>>The code I showed you was meant as more of a direction than a solution.
>>
>>For instance the pigment yellow and magenta pigment was included only to
>>show the influence of the added blob components.  A shallower ridge can
>>be gotten by tweaking down the threshold value ( get it low, maybe .03
>>or so ) while increasing the radius of the ridge blobs ( maybe .14 )
>>You migh also notice that I also locate the blobs just under the surface
>>of the ball.
>>
>>Also in the original thread you quoted, H E Day posted a suggestion for
>>how to "feather" the edges ( which was the original question on the
>>thread.)  His suggestin was to replace each blob component with several
>>in the same place each one trading off radius v strength
>>
>>So
>>
>>instead of something like:
>>
>>Radius=.14
>>Strength=1
>>blob { threshold .03
>> sphere { 0, 1, 1 }
>> STARTLOOP
>>  sphere ( Location, Radius, Strenght )
>>
>> ENDLOOP
>>}
>>
>>do something like:
>>
>>Radius1=.10
>>Strenght1=1.2
>>Radius2=.12
>>Strength2=1.1
>>Radius3=.14
>>Strenght3=1.0
>>
>>blob { threshold .03
>> sphere { 0, 1, 1 }
>> STARTLOOP
>>  sphere { Location, Radius1, Strength1 }
>>  sphere { Location, Radius2, Strength2 }
>>  sphere { Location, Radius3, Strength3 }
>> ENDLOOP
>>}
>>
>>I think you could try and tweak these factors before we attack the
>>threading issue.
>>
>>I am not sure how radically you would need to vary the Radius and
>>Strenght over the three "copies" in order to get the effect H Day
>>describes.  I have never tried the technique myself.  But H E Day was a
>>blob master.  Perhaps try some controlled experiments to assure yourself
>>of how the technique works before working directly on the ball model.
>>
>>-Jim
> 
> 
> I'll try to go in the direction you have indicated.  It will probably be a
> few days before I post back what I have put together. It may have to wait
> until the weekend.  Thanks for your sharing of knowledge.
> -Wayne
> 
You're welcome.  I am not sure how much you understand about the 
concepts behind these techniques or have knowledge of POV's SDL, but if 
you don't you should take this opportunity to research these things. 
This is a great project for refining your abilities with vectors, 
transforms, and splines.  Right now we are operating pretty much at the 
limits of my understanding.

Again I want to emphasize that the code* I showed you is quite 
abbreviated.  Not only can the parameters be tweaked but the code could 
and should be further refined.

For instance, right now the "Seg" vector is dependent on the size of the 
"step" we use to "walk" along the spline .  This, of course is 
controlled by the "Grain" value.  Seg should be uncoupled from Grain. 
Worse, the length of "Cross" is related to the length of "Seg".  Cross 
should be "normalized" so it is independent of Seg and can be scaled in 
POV units.

Also, I would suggest incorporating the rand() function to "jitter" the 
placement, even the size, of the blobs forming the ridge so that it
will appear less regular.

*some on the groups here wince when we refer to SDL as "code".  To many 
hardcore programmers it is "script".  Otoh, SDL is also held to be a 
"turing-complete" programming language, so go figure.


Post a reply to this message

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