|
|
|
|
|
|
| |
| |
|
|
From: Alain
Subject: Re: How to: Sphere with 3D Electric Field Lines
Date: 28 Sep 2014 14:11:47
Message: <54284f63@news.povray.org>
|
|
|
| |
| |
|
|
>> As I said, my physics are poor and I do not know what to visualize under
>> an electric field. Does that resemble a magnetic field like the one
>> around the Earth? For the first example at least that would mean toruses
>> in 3D space.
>>
>> Thomas
>
> Hi Thomas! I am also not a physicist but the way to find a solution is to use
> the first example which is simpler. I think what is needed is to attach in a way
> the value of the amplitude (E=K*q/r^2) to the cylinder length. The formula of
> the electric field is just a function like y=1/r^2. As I can imagine it probably
> cannot work like this but using y=1/r^2 to create a color gradient with distance
> as a first attempt.
>
> I think you are right, the solution could be isosurfaces (I suppose they are
> similar to contours or to equipotential surfaces) using the y=1/r^2 as a first
> attempt. If you can find a solution on this, it would be greatly appreciated.
>
> Ioannis
>
>
Isosurface ARE equipotential surfaces for a given equation. The surface
is everywhere where the function evaluate to a thresshold value. That
value can be zero, or just any arbitrary one.
For y=1/r^2, you need to replace (r^2) by sqrt(pow(x,2) + pow(y,2) +
pow(z,2)) [working in 3D space]
Your formula mecomes:
sqrt(pow(x,2) + pow(y,2) + pow(z,2)) = r
If you use "r" as the treshold of your isosurface, it gives you a sphere
of radius r.
Alain
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: How to: Sphere with 3D Electric Field Lines
Date: 28 Sep 2014 15:09:50
Message: <54285cfe$1@news.povray.org>
|
|
|
| |
| |
|
|
On 09/27/2014 11:39 AM, Johann wrote:
>
> Thanks Bill for your proposal! Just a few minutes ago POV RAY started to render
> the image and it took about 14 minutes for 320x240 AA 0.3. I believe that what I
> am looking for is relative easy and not so complicated.
>
Johann & all,
A memory came back to me a bit ago of work on some vector analysis
functions a decade or more back. Sure enough in Pov-Ray's math.inc there
is a collection of functions written by Christoph Hormann and Tor Olav
Kristensen. Also an example povray file in
scenes/incdemo/f_guncradient.pov.
Stealing code almost directly from func_gradient.pov and using our
functions to control pigments instead of generate isosurfaces we can get
something which runs quite a lot faster.
While likely not as artistic an output as I think you want, the result
at least touches on all the elements I believe you seek.
I'll post an image generated by the code below to p.b.images shortly.
Bill P.
//-------------- e_static_v2.pov --------------------
#version 3.7;
global_settings {
assumed_gamma 1
ambient_light srgb <1,1,1>
}
#declare White = srgbft <1,1,1,0,0>;
background {
color White
}
#declare Camera00 = camera {
orthographic
location <0,0,-10>
sky <0,1,0>
right x*(image_width/image_height)
look_at <0,0,0>
}
#declare Light00 = light_source {
<50,150,-250>, White
}
#declare Red = srgbft <1,0,0,0,0>;
#declare Blue = srgbft <0,0,1,0,0>;
#include "functions.inc"
#declare Fn00 = function (x,y,z,k,q) {
(k*q)/(x*x+y*y+z*z+1e-7)
}
#declare Fn01 = function (x,y,z,_X,_Y,_Z,k,q) {
Fn00(x-_X,y-_Y,z-_Z,k,q)
}
#declare Fn02 = function (x,y,z) {
Fn01(x,y,z,2.5,0.0,0.0,1.0,-1.0)
}
#declare Fn03 = function (x,y,z) {
Fn01(x,y,z,-2.5,0.0,0.0,1.0,1.0)
}
#declare Fn04 = function (x,y,z) {
Fn02(x,y,z)+Fn03(x,y,z)
}
#declare Fn04normalized = function (x,y,z) {
(Fn04(x*10,y*10,z*10)+1.0)/2.001
}
#declare Clear100 = srgbft <1,1,1,1,0>;
#declare ColorMapField = color_map {
[ 0 Blue ]
[ 0.5 Clear100 ]
[ 1 Red ]
}
#declare PigmentField = pigment {
function { Fn04normalized(x,y,z) }
color_map { ColorMapField }
}
#declare TextureField = texture {
pigment { PigmentField }
}
#declare Magenta = srgbft <1,0,1,0,0>;
#declare ColorMapContour = color_map {
[ 0 Clear100 ]
[ 0.5-(0.5/pow(2,1))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,1))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,1))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,2))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,2))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,2))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,3))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,3))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,3))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,4))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,4))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,4))+0.005 Clear100 ]
[ 0.5-0.005 Clear100 ]
[ 0.5+0.000 Magenta ]
[ 0.5+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,4))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,4))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,4))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,3))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,3))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,3))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,2))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,2))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,2))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,1))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,1))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,1))+0.005 Clear100 ]
[ 1 Clear100 ]
}
#declare PigmentContour = pigment {
function { Fn04normalized(x,y,z) }
color_map { ColorMapContour }
}
#declare TextureContour = texture {
pigment { PigmentContour }
}
#macro Texture2Dslice_ListOf_0 ()
texture { TextureContour }
texture { TextureField }
#end
#declare Box00 = box {
<-9.5,-9.5,-0.001>,<9.5,9.5,0.001>
}
#declare Sphere00 = sphere { <-0.25,0,0>, 0.1
pigment { color Red }
no_shadow
}
#declare Sphere01 = sphere { <0.25,0,0>, 0.1
pigment { color Blue }
no_shadow
}
#declare Obj2DSlice = object {
object { Box00 }
Texture2Dslice_ListOf_0()
}
//---
camera { Camera00 }
light_source { Light00 }
object { Sphere00 }
object { Sphere01 }
object { Obj2DSlice }
//--------------- Code below from scenes/incdemo/func_gradient.pov
#include "math.inc"
#declare PosX=-1.0;
#declare Spacing=0.018; // 0.018
union {
#while (PosX < 1.0)
#declare PosY=-0.5;
#while (PosY < 0.5)
#declare Pos=<PosX, PosY, 0>;
#declare Vgrd=vGradient(Fn04normalized, Pos);
#declare Vgrd=<Vgrd.x, Vgrd.y, 0>*0.1;
#if (vlength(Vgrd)<0.300)
cylinder {
<PosX, PosY, 0>-Vgrd*0.105,
<PosX, PosY, 0>+Vgrd*0.105,
0.001
texture {
pigment { color srgb y*Gradient_Length(Fn04normalized,
Pos)*0.25 }
}
}
#end
#declare PosY=PosY+Spacing;
#end
#declare PosX=PosX+Spacing;
#end
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 09/27/2014 11:39 AM, Johann wrote:
> >
> > Thanks Bill for your proposal! Just a few minutes ago POV RAY started to render
> > the image and it took about 14 minutes for 320x240 AA 0.3. I believe that what I
> > am looking for is relative easy and not so complicated.
> >
> Johann & all,
>
> A memory came back to me a bit ago of work on some vector analysis
> functions a decade or more back. Sure enough in Pov-Ray's math.inc there
> is a collection of functions written by Christoph Hormann and Tor Olav
> Kristensen. Also an example povray file in
>
> scenes/incdemo/f_guncradient.pov.
>
> Stealing code almost directly from func_gradient.pov and using our
> functions to control pigments instead of generate isosurfaces we can get
> something which runs quite a lot faster.
>
> While likely not as artistic an output as I think you want, the result
> at least touches on all the elements I believe you seek.
>
> I'll post an image generated by the code below to p.b.images shortly.
>
> Bill P.
Thank you Bill very much! This is really very close to what I am trying to
achieve. May I ask something:
If I modify only the following declare expression:
#declare Fn00 = function (x,y,z,k,q) {
(k*q)/(x*x+y*y+z*z+1e-7)
}
would be enough to see a different rendered image or it is required in more
places? I am not speaking about rotation just different field distribution. Is
it possible the field lines to look like arrows that will show the direction of
the field? Besides that the equipotential lines are really beautiful!
Great Job and thank you for once more!
Johann
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> On 09/27/2014 11:39 AM, Johann wrote:
>>>
>>> Thanks Bill for your proposal! Just a few minutes ago POV RAY started to render
>>> the image and it took about 14 minutes for 320x240 AA 0.3. I believe that what I
>>> am looking for is relative easy and not so complicated.
>>>
>> Johann & all,
>>
>> A memory came back to me a bit ago of work on some vector analysis
>> functions a decade or more back. Sure enough in Pov-Ray's math.inc there
>> is a collection of functions written by Christoph Hormann and Tor Olav
>> Kristensen. Also an example povray file in
>>
>> scenes/incdemo/f_guncradient.pov.
>>
>> Stealing code almost directly from func_gradient.pov and using our
>> functions to control pigments instead of generate isosurfaces we can get
>> something which runs quite a lot faster.
>>
>> While likely not as artistic an output as I think you want, the result
>> at least touches on all the elements I believe you seek.
>>
>> I'll post an image generated by the code below to p.b.images shortly.
>>
>> Bill P.
>
> Thank you Bill very much! This is really very close to what I am trying to
> achieve. May I ask something:
> If I modify only the following declare expression:
> #declare Fn00 = function (x,y,z,k,q) {
> (k*q)/(x*x+y*y+z*z+1e-7)
> }
> would be enough to see a different rendered image or it is required in more
> places? I am not speaking about rotation just different field distribution. Is
> it possible the field lines to look like arrows that will show the direction of
> the field? Besides that the equipotential lines are really beautiful!
>
> Great Job and thank you for once more!
>
> Johann
>
>
If you want to replace the lines representing the field orientation and
strength with arrows, you need to change where they are placed:
union {
#while (PosX < 1.0)
#declare PosY=-0.5;
#while (PosY < 0.5)
#declare Pos=<PosX, PosY, 0>;
#declare Vgrd=vGradient(Fn04normalized, Pos);
#declare Vgrd=<Vgrd.x, Vgrd.y, 0>*0.1;
#if (vlength(Vgrd)<0.300)
cylinder {
<PosX, PosY, 0>-Vgrd*0.105,
<PosX, PosY, 0>+Vgrd*0.105,
0.001
texture {
pigment { color srgb y*Gradient_Length(Fn04normalized,
Pos)*0.25 }
}
}
#end
#declare PosY=PosY+Spacing;
#end
#declare PosX=PosX+Spacing;
#end
}
To become something like this:
union {
#while (PosX < 1.0)
#declare PosY=-0.5;
#while (PosY < 0.5)
#declare Pos=<PosX, PosY, 0>;
#declare Vgrd=vGradient(Fn04normalized, Pos);
#declare Vgrd=<Vgrd.x, Vgrd.y, 0>*0.1;
#if (vlength(Vgrd)<0.300)
union{
cylinder {
<PosX, PosY, 0>-Vgrd*0.105,
<PosX, PosY, 0>,
0.001}
cone{
<PosX, PosY, 0>,0.03,
<PosX, PosY, 0>+Vgrd*0.105, 0}
texture {
pigment { color srgb y*Gradient_Length(Fn04normalized,
Pos)*0.25 }
}
}
cone{<PosX, PosY, 0>,0.03, <PosX, PosY, 0>+Vgrd*0.105, 0}
#end
#declare PosY=PosY+Spacing;
#end
#declare PosX=PosX+Spacing;
#end
}
Now, one half of each lines stay the same while the other half is
replaced by a cone. They are placed in an union so that they can get the
pigment in one statement.
Alain
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: How to: Sphere with 3D Electric Field Lines
Date: 2 Oct 2014 22:49:52
Message: <542e0ed0$1@news.povray.org>
|
|
|
| |
| |
|
|
On 09/28/2014 04:11 PM, Johann wrote:
>
> Thank you Bill very much! This is really very close to what I am trying to
> achieve. May I ask something:
> If I modify only the following declare expression:
> #declare Fn00 = function (x,y,z,k,q) {
> (k*q)/(x*x+y*y+z*z+1e-7)
> }
> would be enough to see a different rendered image or it is required in more
> places? I am not speaking about rotation just different field distribution. Is
> it possible the field lines to look like arrows that will show the direction of
> the field? Besides that the equipotential lines are really beautiful!
>
Johann,
Changing the base equation would certainly change results, but the code
was set up to implement changes on each placed sphere. Though true that,
due my hacking, the previous code did need to be changed throughout to
stay lined up with by sphere changes. Suppose I was aiming to offer an
example more than a complete solution.
Below is an updated version of the code through the contours part,
modified so the charged sphere specifications are centralized - so it is
easier to play with values and placements. I've added a couple of
additional spheres to make the resultant image more interesting.
There are a thousand ways to further change & improve things, but I am
going to leave the rest as an exercise for any users of the code.
Have fun.
Bill P.
//----------------------- V3 ------------------------
#version 3.7;
global_settings {
assumed_gamma 1
ambient_light srgb <1,1,1>
}
#declare White = srgbft <1,1,1,0,0>;
background {
color White
}
#declare Camera00 = camera {
orthographic
location <0,0,-10>
sky <0,1,0>
right x*(image_width/image_height)
look_at <0,0,0>
}
#declare Light00 = light_source {
<50,150,-250>, White
}
#declare Grey05 = srgbft <0.05,0.05,0.05,0,0>;
#declare CylinderX = cylinder {
<-1,0,0>, <1,0,0>, 0.005
pigment { color Grey05 }
no_shadow
}
#declare Grey95 = srgbft <0.95,0.95,0.95,0,0>;
#declare CylinderY = cylinder {
<0,-1,0>, <0,1,0>, 0.005
pigment { color Grey95 }
no_shadow
}
#declare Grey50 = srgbft <0.5,0.5,0.5,0,0>;
#declare CylinderZ = cylinder {
<0,0,-1>, <0,0,1>, 0.005
pigment { color Grey50 }
no_shadow
}
#declare Sphere00 = sphere { <0,0,0>, 1 }
#declare K = 1.0;
#declare Min_e = -1.0;
#declare Max_e = 1.0;
#declare Range_e = Max_e-Min_e;
#declare MidAdj_e = Range_e/2;
#declare MaxPlotRange = 10.0;
#include "functions.inc"
#declare Fn00 = function (x,y,z,k,q) {
(k*q)/(x*x+y*y+z*z+1e-7)
}
#declare Fn01 = function (x,y,z,vx,vy,vz,k,q,mag) {
Fn00((x/mag/abs(q))-(vx/mag/abs(q)),(y/mag/abs(q))-(vy/mag/abs(q)),(z/mag/abs(q))-(vz/mag/abs(q)),k,q)
}
#declare Radius02 = 1.0;
#declare Position02 = <2.5,0,0,0.0>;
#declare Fn02 = function (x,y,z) {
#local vx=Position02.x; #local vy=Position02.y; #local
vz=Position02.z; Fn01(x,y,z,vx,vy,vz,K,-1.0,Radius02)
}
#declare Radius03 = 1.0;
#declare Position03 = <-2.5,0,0,0.0>;
#declare Fn03 = function (x,y,z) {
#local vx=Position03.x; #local vy=Position03.y; #local
vz=Position03.z; Fn01(x,y,z,vx,vy,vz,K,1.0,Radius03)
}
#declare Radius04 = 0.5;
#declare Position04 = <0.0,2.0,0.0>;
#declare Fn04 = function (x,y,z) {
#local vx=Position04.x; #local vy=Position04.y; #local
vz=Position04.z; Fn01(x,y,z,vx,vy,vz,K,1.0,Radius04)
}
#declare Radius05 = 0.2;
#declare Position05 = <-0.4,-2.2,0.0>;
#declare Fn05 = function (x,y,z) {
#local vx=Position05.x; #local vy=Position05.y; #local
vz=Position05.z; Fn01(x,y,z,vx,vy,vz,K,-1.0,Radius05)
}
#declare FnAllCharges = function (x,y,z) {
Fn02(x,y,z)+Fn03(x,y,z)+Fn04(x,y,z)+Fn05(x,y,z)
}
#declare FnAllChargesNormalized = function (x,y,z) {
(FnAllCharges(x*MaxPlotRange,y*MaxPlotRange,z*MaxPlotRange)+MidAdj_e)/Range_e
}
#declare FnPigmentAllCharges = function (x,y,z) {
min(1,max(0,FnAllChargesNormalized(x,y,z)))
}
#declare Blue = srgbft <0,0,1,0,0>;
#declare Clear100 = srgbft <1,1,1,1,0>;
#declare Red = srgbft <1,0,0,0,0>;
#declare ColorMapField = color_map {
[ 0 Blue ]
[ 0.5 Clear100 ]
[ 1 Red ]
}
#declare PigmentField = pigment {
function { FnPigmentAllCharges(x,y,z) }
color_map { ColorMapField }
}
#declare TextureField = texture {
pigment { PigmentField }
}
#declare Grey80 = srgbft <0.8,0.8,0.8,0,0>;
#declare ColorMapSphere = color_map {
[ 0 Blue ]
[ 0.5 Grey80 ]
[ 1 Red ]
}
#declare PigmentSphere = pigment {
function { FnPigmentAllCharges(x,y,z) }
color_map { ColorMapSphere }
}
#declare TextureSphere = texture {
pigment { PigmentSphere }
}
#declare ObjSphere02 = object {
object { Sphere00 }
scale Radius02
translate <Position02.x,Position02.y,Position02.z>
}
#declare ObjSphere03 = object {
object { Sphere00 }
scale Radius03
translate <Position03.x,Position03.y,Position03.z>
}
#declare ObjSphere04 = object {
object { Sphere00 }
scale Radius04
translate <Position04.x,Position04.y,Position04.z>
}
#declare ObjSphere05 = object {
object { Sphere00 }
scale Radius05
translate <Position05.x,Position05.y,Position05.z>
}
#declare UnionAllSpheres = union {
object { ObjSphere02 }
object { ObjSphere03 }
object { ObjSphere04 }
object { ObjSphere05 }
scale 1/MaxPlotRange
}
#declare ObjAllSpheres = object {
object { UnionAllSpheres }
texture { TextureSphere }
no_shadow
}
#declare Magenta = srgbft <1,0,1,0,0>;
#declare ColorMapContour = color_map {
[ 0 Clear100 ]
[ 0.5-(0.5/pow(2,1))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,1))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,1))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,2))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,2))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,2))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,3))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,3))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,3))+0.005 Clear100 ]
[ 0.5-(0.5/pow(2,4))-0.005 Clear100 ]
[ 0.5-(0.5/pow(2,4))+0.000 Magenta ]
[ 0.5-(0.5/pow(2,4))+0.005 Clear100 ]
[ 0.5-0.005 Clear100 ]
[ 0.5+0.000 Magenta ]
[ 0.5+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,4))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,4))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,4))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,3))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,3))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,3))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,2))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,2))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,2))+0.005 Clear100 ]
[ 0.5+(0.5/pow(2,1))-0.005 Clear100 ]
[ 0.5+(0.5/pow(2,1))+0.000 Magenta ]
[ 0.5+(0.5/pow(2,1))+0.005 Clear100 ]
[ 1 Clear100 ]
}
#declare PigmentContour = pigment {
function { FnAllChargesNormalized(x,y,z) }
color_map { ColorMapContour }
}
#declare TextureContour = texture {
pigment { PigmentContour }
}
#macro Texture2Dslice_ListOf_0 ()
texture { TextureContour }
texture { TextureField }
#end
#declare Box00 = box {
<-9.5,-9.5,-0.001>,<9.5,9.5,0.001>
}
#declare Obj2DSlice = object {
object { Box00 }
Texture2Dslice_ListOf_0()
}
//---
camera { Camera00 }
light_source { Light00 }
object { CylinderX }
object { CylinderY }
object { CylinderZ }
object { ObjAllSpheres }
object { Obj2DSlice }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> There are a thousand ways to further change & improve things, but I am
> going to leave the rest as an exercise for any users of the code.
>
> Have fun.
> Bill P.
Very nice,
reminds me somewhat on Tek's wips on magnetism (he provided even code) ...
http://evilsuperbrain.com/gallery/wip/index.php?image=magnetism3
http://news.povray.org/povray.binaries.images/thread/%3C432a6c1c@news.povray.org%3E/?ttop=247446&toff=1400
Norbert
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: How to: Sphere with 3D Electric Field Lines
Date: 3 Oct 2014 14:23:06
Message: <542ee98a$1@news.povray.org>
|
|
|
| |
| |
|
|
On 10/03/2014 02:53 AM, Norbert Kern wrote:
>
> Very nice,
> reminds me somewhat on Tek's wips on magnetism (he provided even code) ...
>
> http://evilsuperbrain.com/gallery/wip/index.php?image=magnetism3
>
http://news.povray.org/povray.binaries.images/thread/%3C432a6c1c@news.povray.org%3E/?ttop=247446&toff=1400
>
> Norbert
>
Thanks Norbert & thank you for the pointer to Tek's previous work. Not
work I recall. Perhaps never saw it, but at my age also possible the
neurons maintaining the memory have quit.
Aside: I read in one of your recent newsgroup postings your collection
of materials is now at 600 or so. Looking forward to an update - though
I have to admit I've got the 5 or 6 slowest of your first 330 still to
render. Not being very experienced with materials, I've been amazed at
just how slow some of them can be!
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> Aside: I read in one of your recent newsgroup postings your collection
> of materials is now at 600 or so. Looking forward to an update - though
> I have to admit I've got the 5 or 6 slowest of your first 330 still to
> render. Not being very experienced with materials, I've been amazed at
> just how slow some of them can be!
>
> Bill P.
Purely my fault,
using a new demo scene, there is no such problem anymore.
At 400:225 all scenes of the old "300" material setup needed a bit more than a
day - the new setup allows to render the materials with 1280:720 within the same
time...
And as you can see, it isn't only a sphere on a plane... (
http://news.povray.org/povray.binaries.images/attachment/%3Cweb.54295d1d46a0060a84d386ea0%40news.povray.org%3E/material
s%20update%20examples.jpg
).
And - trust me - the deeper you look in the newsgroups intestines, the more you
will discover. Of course the same is true for private websites, IRTC etc.
By example, Samuel Benge discovered a way to use 65536 samples with nested
average patterns instead of the usual 256 and I don't understand how he did it.
Or let's take Rune's good old grass demos. He managed to construct a pigment
showing to the camera and simulating a 3D grass population.
I'm sure this trick is worth for many new materials alone - at least, if I can
delve deeper into the code...
etc. etc...
Norbert
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Johann,
> Changing the base equation would certainly change results, but the code
> was set up to implement changes on each placed sphere. Though true that,
> due my hacking, the previous code did need to be changed throughout to
> stay lined up with by sphere changes. Suppose I was aiming to offer an
> example more than a complete solution.
>
> Below is an updated version of the code through the contours part,
> modified so the charged sphere specifications are centralized - so it is
> easier to play with values and placements. I've added a couple of
> additional spheres to make the resultant image more interesting.
>
> There are a thousand ways to further change & improve things, but I am
> going to leave the rest as an exercise for any users of the code.
>
> Have fun.
> Bill P.
>
Thank you very much Bill. Now it really gets interesting!
Wish you all the best!
Johann
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> To become something like this:
>
> union {
> #while (PosX < 1.0)
> #declare PosY=-0.5;
> #while (PosY < 0.5)
> #declare Pos=<PosX, PosY, 0>;
> #declare Vgrd=vGradient(Fn04normalized, Pos);
> #declare Vgrd=<Vgrd.x, Vgrd.y, 0>*0.1;
> #if (vlength(Vgrd)<0.300)
> union{
> cylinder {
> <PosX, PosY, 0>-Vgrd*0.105,
> <PosX, PosY, 0>,
> 0.001}
> cone{
> <PosX, PosY, 0>,0.03,
> <PosX, PosY, 0>+Vgrd*0.105, 0}
> texture {
> pigment { color srgb y*Gradient_Length(Fn04normalized,
> Pos)*0.25 }
> }
> }
> cone{<PosX, PosY, 0>,0.03, <PosX, PosY, 0>+Vgrd*0.105, 0}
> #end
> #declare PosY=PosY+Spacing;
> #end
> #declare PosX=PosX+Spacing;
> #end
> }
>
> Now, one half of each lines stay the same while the other half is
> replaced by a cone. They are placed in an union so that they can get the
> pigment in one statement.
>
>
> Alain
Although it looks a little bit strange the result ( a mix of polygons and
arrows), I really thank you for your help!
Johann
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|