









 
 




 
 


Hi everyone, i'm Pablo, firstyear engineer design student and I have to make up
this product on pov ray. How would you make it? Sphere_sweep? It doesnt look so
realistic:(
Thanks
This is the product:
http://e01expansion.uecdn.es/assets/multimedia/imagenes/2017/08/24/15035604280222.gif
Post a reply to this message


 
 




 
 


"Pablo" <Pab### [at] gmailcom> wrote:
> Hi everyone, i'm Pablo, firstyear engineer design student and I have to make up
> this product on pov ray. How would you make it? Sphere_sweep? It doesnt look so
> realistic:(
I'd say that the central portion ought to be an isosurface with a spherical
equation modified with a sine wave, then asymmetrically scaled (see "Nonlinear
scale").
See the Insert Menu, under Special Shapes, Isosurfaces by basic function,
Isosurface sin sphere .
Then scale it:
http://www.econym.demon.co.uk/isotut/substitute.htm
Then add spheresweep legs, or an isosurface equivalent.
http://www.econym.demon.co.uk/isotut/more.htm#spline
http://www.econym.demon.co.uk/isotut/splines.htm
Post a reply to this message


 
 




 
 


Le 171213 Ã 17:59, Pablo a Ã©critÂ :
> Hi everyone, i'm Pablo, firstyear engineer design student and I have to make up
> this product on pov ray. How would you make it? Sphere_sweep? It doesnt look so
> realistic:(
> Thanks
>
> This is the product:
>
http://e01expansion.uecdn.es/assets/multimedia/imagenes/2017/08/24/15035604280222.gif
>
>
>
As Bald Eagle said, but I'd start with the piriform internal function
that you can find in functions.inc
#include "functions.inc"
Then, you can use f_piriform(x,y,z, Strength).
Alternatively, you may rather want to use half of
f_lemniscate_of_gerono(x,y,z, Strength).
In both cases, you want to scale up along the main axis.
f_piriform_2d and f_lemniscate_of_gerono_2d are more complexe
implementations that allow more control over the shape, like making it
more or less rounded.
Take a look at the sample scene i_internals.pov to get a better
understanding of the working of those.
For the ribbing, I'd use #declare f_radial = function {pattern {radial
sin_wave frequency 12}} to be added (go inward) or subtracted (go
outward) from the above function.
Adjust frequency if you want more or less ribs.
Post a reply to this message


 
 




 
 


"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Pablo" <Pab### [at] gmailcom> wrote:
> > Hi everyone, i'm Pablo, firstyear engineer design student and I have to make up
> > this product on pov ray. How would you make it? Sphere_sweep? It doesnt look so
> > realistic:(
>
>
> I'd say that the central portion ought to be an isosurface with a spherical
> equation modified with a sine wave, then asymmetrically scaled (see "Nonlinear
> scale").
>
> See the Insert Menu, under Special Shapes, Isosurfaces by basic function,
> Isosurface sin sphere .
> Then scale it:
> http://www.econym.demon.co.uk/isotut/substitute.htm
>
> Then add spheresweep legs, or an isosurface equivalent.
>
> http://www.econym.demon.co.uk/isotut/more.htm#spline
> http://www.econym.demon.co.uk/isotut/splines.htm
Hey Bald Eagle, I tried doing the way you said but i only could to make a
isosurface sin sphere and how its name says, its a sphere but I need a kind of
water drop. Wich funcion could I use with the sin to make this shape? Not sure
if im explaining well
Post a reply to this message


 
 




 
 


Le 171222 Ã 15:42, Pablo a Ã©critÂ :
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> "Pablo" <Pab### [at] gmailcom> wrote:
>>> Hi everyone, i'm Pablo, firstyear engineer design student and I have to make up
>>> this product on pov ray. How would you make it? Sphere_sweep? It doesnt look so
>>> realistic:(
>>
>>
>> I'd say that the central portion ought to be an isosurface with a spherical
>> equation modified with a sine wave, then asymmetrically scaled (see "Nonlinear
>> scale").
>>
>> See the Insert Menu, under Special Shapes, Isosurfaces by basic function,
>> Isosurface sin sphere .
>> Then scale it:
>> http://www.econym.demon.co.uk/isotut/substitute.htm
>>
>> Then add spheresweep legs, or an isosurface equivalent.
>>
>> http://www.econym.demon.co.uk/isotut/more.htm#spline
>> http://www.econym.demon.co.uk/isotut/splines.htm
>
>
> Hey Bald Eagle, I tried doing the way you said but i only could to make a
> isosurface sin sphere and how its name says, its a sphere but I need a kind of
> water drop. Wich funcion could I use with the sin to make this shape? Not sure
> if im explaining well
>
>
If you play with the x,y, and z parameters, tou can stretch ans squish
the shape.
(x,y/3,z,...) will stertch your shape vertically by a factor of 3. It's
similat to scale<1,3,1>.
You can also perform some nonuniform scalling:
(x,sqr(abs(y)),z,...) (x, y*(x+z), z, ...) ...
If you want to have a wavy shape, you can add or substrace a function to
another:
#declare f_radial = function{pattern{dadial frequency 20 sin_wave rotate
90*x}};
function{f_sphere(x,y,z) + f_radial(x,y,z)}
Post a reply to this message


 
 




 
 


"Pablo" <Pab### [at] gmailcom> wrote:
> Hey Bald Eagle, I tried doing the way you said but i only could to make a
> isosurface sin sphere and how its name says, its a sphere but I need a kind of
> water drop. Wich funcion could I use with the sin to make this shape? Not sure
> if im explaining well
Is this close enough to what you need?
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5a31dcc89a8d03875cafe28e0%40news.povray.org%3E/
First I defined a "sine sphere"  just like I assume you've accomplished, but as
a function.
Next I made an isosurface using that function, but replaced y with and equation
to nonlinearly scale it.
Then I stretched it by scaling <1, n, 1>
Then i just made a leg with a sphere sweep, and used it 3 times, rotating +120
deg for the next two.
Hope that helps  post your results (and code) in the binary images thread!
Good luck!
Post a reply to this message


 
 




 
 


"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Pablo" <Pab### [at] gmailcom> wrote:
>
> > Hey Bald Eagle, I tried doing the way you said but i only could to make a
> > isosurface sin sphere and how its name says, its a sphere but I need a kind of
> > water drop. Wich funcion could I use with the sin to make this shape? Not sure
> > if im explaining well
>
> Is this close enough to what you need?
>
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5a31dcc89a8d03875cafe28e0%40news.povray.org%3E/
>
> First I defined a "sine sphere"  just like I assume you've accomplished, but as
> a function.
>
> Next I made an isosurface using that function, but replaced y with and equation
> to nonlinearly scale it.
>
> Then I stretched it by scaling <1, n, 1>
>
> Then i just made a leg with a sphere sweep, and used it 3 times, rotating +120
> deg for the next two.
>
> Hope that helps  post your results (and code) in the binary images thread!
>
> Good luck!
Wow, that's exactly what I want to do! But I don't know what equation to
nonlinearly you have put instead of the y on the "sine sphere". That's the
point for me. So it's this function:
sqrt( x*x + y*y + z*z )  0.9
+ sin( 12*atan2(x, z) )*0.051
(isn't it?) but on both y's that appear on the sqrt what should I replace for?
Thanks for all the attention. (I haven't seen the work you done seting the
product until today, i'm new on this web site. I'm so thankful, seriusly)
Post a reply to this message


 
 




 
 


"Pablo" <Pab### [at] gmailcom> wrote:
> Wow, that's exactly what I want to do! But I don't know what equation to
> nonlinearly you have put instead of the y on the "sine sphere". That's the
> point for me. So it's this function:
>
> sqrt( x*x + y*y + z*z )  0.9
> + sin( 12*atan2(x, z) )*0.051
>
> (isn't it?) but on both y's that appear on the sqrt what should I replace for?
> Thanks for all the attention. (I haven't seen the work you done seting the
> product until today, i'm new on this web site. I'm so thankful, seriusly)
So,
I first used an example equation for a sin sphere
#declare P = function {sqrt (x*x + y*y + z*z)  0.9 + sin (12*atan2 (x, z)
)*0.05}
(probably from the dropdown insert menu)
Then I used that in an isosurface
#declare Central = isosurface {function { P(x, y*(1.05y/4), z) }
....
and stretched it a bit
scale <1, 3, 1>
....
}
That nonlinear scaling by variable substitution comes right out of:
http://www.econym.demon.co.uk/isotut/substitute.htm
(scroll about halfway down)
Note that when you have a lot of things going on, it's sometimes easier to break
your equations and variable substitutions down into separate more easily
handled, understood functions that can be combined.
So the above could also be done like:
#declare Y = function {y*(1.05y/4)}
#declare P = function {sqrt (x*x + Y*Y + z*z)  0.9 + sin (12*atan2 (x, z)
)*0.05}
#declare Central = isosurface {function { P(x, Y, z) } ...
Note that the function Y is capitalized to differentiate it from the vector y or
the function variable y that both get reserved by the POVRay parser.
Also the function Y has to be declared before function P, since P uses Y in its
definition.
So, here we've quickly slapped together something that has the desired
attributes of the goal, which with a lot of blathering and handwaving is
probably fine for an "artist's conception" but as an _engineer_, I'd be looking
to understand how the variables control the absolute dimensions of the shape,
such that if the goal becomes "It needs to be THIS high, and THIS wide....
then you could define height and width variables and have the dimensions of the
shape calculated based on those.
Maybe you'd want deeper or shallower waves on the sine sphere..
"Given a material of density d, it can weight no more than W...)
(What is the volume of the sine sphere?)
"But when great and ingenious artists behold their so inept performances, not
undeservedly do they ridicule the blindness of such men; since sane judgment
abhors nothing so much as a picture perpetrated with no technical knowledge,
although with plenty of care and diligence. Now the sole reason why painters of
this sort are not aware of their own error is that they have not learnt
Geometry, without which no one can either be or become an absolute artist; but
the blame for this should be laid upon their masters, who are themselves
ignorant of this art."
The Art of Measurement. 1525.
Albrecht Dürer (1471 to 1528)
(I came a cross a better quote, which IIRC was attributed to Archimedes, but I
can't seem to be able to find that one again.)
Post a reply to this message


 
 




 
 


Le 171224 Ã 09:10, Pablo a Ã©critÂ :
> Wow, that's exactly what I want to do! But I don't know what equation to
> nonlinearly you have put instead of the y on the "sine sphere". That's the
> point for me. So it's this function:
>
> sqrt( x*x + y*y + z*z )  0.9
> + sin( 12*atan2(x, z) )*0.051
>
> (isn't it?) but on both y's that appear on the sqrt what should I replace for?
> Thanks for all the attention. (I haven't seen the work you done seting the
> product until today, i'm new on this web site. I'm so thankful, seriusly)
>
>
You need to use the Y component to alter the X and Z components.
Using #include"functions.inc" then using f_sphere(x,y,z,Radius) will be
much faster as it will use compiled code instead of a user defined function.
Also, look at my older posts : I sugest using some other base shapes
that are already pointy at one pole and round at the other. You only
have to stretch those if you want to.
Assuming that your sphere start at 1 unit radius and is centered at the
origin, then you can do this :
sqrt( x*x*(y/2+1.00001) + y*y + z*z*(y/2+1.00001) )
[slow]
OR
f_sphere( x*(y/2+1.00001) + y + z*(y/2+1.00001),1 )
[faster for the exact same shape]
This will scale horizontally by an amount that depend on the Y position.
The "+0.00001" ensure that the scaling never drop to zero, and the "+1"
shift it down so that you get a point at the bottom.
For the ribs, the best way is to use a function made out of the radian
pattern, modified by a frequency, and using sin_wave to ensure a correct
wavy surface shift.
As I proposed elsewhere:
#declare F_Ribs= function{pattern{(radial frequency 10 sin_wave
color_map{[0 rgb 0][1 rgb 1]}).red}}
Adjust the frequency value to get the desired number of ribs. Here, you
get 10 ribs.
The color_map is used to replace the default one.
".red" is used to get a single float and not a colour vector. I could
have used .green, .blue or .grey to get the same effect. .grey will
evaluate slower than the other 3.
And, finally, you get this :
isosurface{
function{
threshold 0
f_sphere( x*(y/2+1.00001), y, z*(y/2+1.00001),1 )
+F_Ribs( x*(y/2+1.000011), 0, z*(y/2+1.000011))
max_gradient 2.5
}
scale <1,3,1>
}
Post a reply to this message


 
 




 
 


"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Pablo" <Pab### [at] gmailcom> wrote:
>
> > Hey Bald Eagle, I tried doing the way you said but i only could to make a
> > isosurface sin sphere and how its name says, its a sphere but I need a kind of
> > water drop. Wich funcion could I use with the sin to make this shape? Not sure
> > if im explaining well
>
> Is this close enough to what you need?
>
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.5a31dcc89a8d03875cafe28e0%40news.povray.org%3E/
>
> First I defined a "sine sphere"  just like I assume you've accomplished, but as
> a function.
>
> Next I made an isosurface using that function, but replaced y with and equation
> to nonlinearly scale it.
>
> Then I stretched it by scaling <1, n, 1>
>
> Then i just made a leg with a sphere sweep, and used it 3 times, rotating +120
> deg for the next two.
>
> Hope that helps  post your results (and code) in the binary images thread!
>
> Good luck!
Wow, that's exactly what I want to do! But I don't know what equation to
nonlinearly you have put instead of the y on the "sine sphere". That's the
point for me. So it's this function:
sqrt( x*x + y*y + z*z )  0.9
+ sin( 12*atan2(x, z) )*0.051
(isn't it?) but on both y's that appear on the sqrt what should I replace for?
Thanks for all the attention. (I haven't seen the work you done seting the
product until today, i'm new on this web site. I'm so thankful, seriusly)
Post a reply to this message


 
 




 

