From: mbrx@swipnet.se.NOSPAM (Mathias Broxvall) Message-ID: <1d8ck60.17etj82187z9rkN@dialup149-1-3.swipnet.se> Jeff Lee wrote: Hi Jeff! > I'd like to try adding a feature to POV-Ray, to let me use splines to > arbitrarily scale objects in a non-linear fashion. Actually this is something I tried to implement quite a long time ago, but failed. I assume now know the basics of how a raytracer works, ie sending of a "ray" from the cammera throught the viewplane and check which object it hits (and bouncing,etc...). The difficult part of what you are suggesting is to determine when such a ray hits the spline scaled object. For a sphere or another primitive it's is fairly easy (in advance) write a simple function that determines when and if a ray hits the object, but with a spline scale the object can be so distorted so that it's quite difficult to determine the intersection of the ray. Remeber that not all polynomials of degree 4 or more *can* be solved analytically. But! We can probably find the intersection nummerically. The simples way to do it would be to use the isosurface patch which can draw any shape you like as long as you can described it as a function. The following example shows how to distort the object described by F1 (a sphere with radius 1) along a simple spline (with only one segment) in the xy-plane. Example: #declare F1 = function { sqr(x)+sqr(y)+sqr(z) - 1 } #declare SPLINE = function { x*x + x - 1 } #declare RESULT = function { F1(x,y+SPLINE(x,y,z),z) } isosurface { function RESULT bounded_by { box{ <-2,-2,-2> <2,2,2> } } max_gradient 10.0 method 2 pigment { color rgb <1,1,0> } finish { phong 0.5 } } The only problem with this approach is that it's slow, you can't distort any object you like (you must describe it as a function) and it would be cumbersome to have intricate spline objects. To simplify things you probably could make a smart includefile which creates an isosurface for every segment in the spline etc... or maybe the macro facility in the isosurface patch could come in handy. / Mathias Broxvall PS. I am not a naitive english speaker, therfore my "mathematical terms" could be quite wrong... I have just tried to translate them from swedish .DS /*===================================== End of message ===================================== From: mbrx@swipnet.se.NOSPAM (Mathias Broxvall) Message-ID: <1d8znra.1afn7nszkeqesN@dialup78-2-26.swipnet.se> Kent Friberg wrote: > Hi Oliver, > check out the thread you started in povray.binaries.animations > > The conclusion was that the phase statement DO NOT alter the surface in any > way, it just LOOKS like the waves are there, another approach (not directly > in POV?) is needed I'm afraid.... > How about using the isosurface patch to represent the water surface with a function. Try this: // Persistence of Vision Ray Tracer Scene Description File // File: ripples.pov // Vers: Isosurface patch // Desc: Some simple ripples // Date: 980513 // Auth: Mathias Broxvall #include "Colors.inc" #include "Skies.inc" camera { location <0.0 , 12.0 ,-16.0> look_at <0.0 , 1.0 , 1.5> } light_source { <0,20,0> color rgb 1 } #declare STRENGTH1 = 1.0 #declare SCALE1 = 1.0 #declare OFFSET1 = clock*5.0 #declare CENTER1_X = -6.0 #declare CENTER1_Z = 0.0 #declare STRENGTH2 = 0.7 #declare SCALE2 = 1.0 #declare OFFSET2 = clock*5.0 #declare CENTER2_X = 7.0 #declare CENTER2_Z = 3.0 #declare wave1Fun = function { STRENGTH1 / (x+1+OFFSET1) * sin(SCALE1 * (x-OFFSET1)) } #declare wave1 = function { wave1Fun(sqrt(sqr(x - CENTER1_X)+sqr(z - CENTER1_Z)),0,0) } #declare wave2Fun = function { STRENGTH2 / (x+1+OFFSET2) * sin(SCALE2 * (x-OFFSET2)) } #declare wave2 = function { wave2Fun(sqrt(sqr(x - CENTER2_X)+sqr(z - CENTER2_Z)),0,0) } #declare foo = function { y - 1 + wave1(x,y,z) + wave2(x,y,z) } isosurface { function { foo } bounded_by {box{<-50,0,-50>,<50,2,50>}} pigment { color rgb <0.5,0.5,1.0> } finish { phong 0.5 //metallic } scale <1,2,1> // lets exagerate it! translate <0,1,0> } / Mathias Broxvall /*===================================== End of message ===================================== From: Hans-Detlev Fink Message-ID: <357E7249.3676@pecos.n.o-s.p.a.m.de> Darcy Johnston wrote: > > Hans-Detlev Fink wrote in message <35782A54.4518@pecos.n.o-s.p.a.m.de>... > >A strange landscape for a warm and sunny weekend. > > > >-Hans- > > Very nicely done. I was wondering if it would be to see the code for the > snow texture. No problem, though it probably won't help you much. You need the slope patch to render slope-dependent textures. The terrain is a 'ridged multifractal isosurface' (for which you need the isosurface patch). /**** begin of code ****/ /******************************* * THE RIDGES *******************************/ // P0 : H // P1 : lacunarity // P2 : octaves // P3 : offset // P4 : gain isosurface { function {"ridgedmf", <0.5, 2.0, 5.0, 0.3, 20.0>, library "i_fract"} bounded_by{ box {<-50, -5, -5>, <50, 5, 10>}} max_gradient 5.5 max_trace 5 texture { slope y texture_map { [ 0.70 T_Brown ] [ 0.80 T_Snow ] } } translate <2.4, 0, 0> scale 10 } /**** end of code ****/ > > Again, very good work, Thank you! > Darcy Cheers -Hans- ----- Remove n.o-s.p.a.m. to obtain my real address. ----- ================================ In seeking the unattainable, simplicity only gets in the way. -- ACM SIGPLAN Sept. 1982 ================================ /*===================================== End of message ===================================== From: parkrrrr@my-dejanews.com (Ron Parker) Message-ID: <3639fb28.0@news.povray.org> On Fri, 30 Oct 1998 17:00:01 +0000, Michael Andrews wrote: > One patch I made to my v3.02 code was an "evaluate" function which took a >declared isosurface function and a position vector, returning the value of the >function at that position. I am not sure if I still have a copy of this, but I >remember it being quite a simple to patch to implement, mostly an extra function >in the expression parsing code. I'm not sure you'd even need an explicit "evaluate" function. It seems you could just automatically evaluate an isosurface function if presented with its name: #declare myvec=<1,2,0>; #declare myfunc=function{sin(x)*cos(y)} #declare myval=myfunc(myvec); This is just a tiny patch to the code in express.c, and without any confusing syntactical overhead for the user. (Probably faster than a macro, too, where either would be acceptable... hmm... ) > I was going to try extending this to return values for any texture pattern, >but v3.1 betas started ariving and I got very sidetracked ... Thinking about it, >it may be easier in v3.1 - the relavent code to get a pattern value must be in >several places, so all that's needed is a wrapper function in the expression >parser? I'll try to peruse the SuperPatch source and see if I can put a >patchette together this weekend :-) The colo[u]r_at( pigment, vector ) function is something I've been toying with adding as well. It is very easy; the compute_pigment function in pigment.c does exactly what you need. All you need to do is call it with the appropriate parameters. You could also forgo the colo[u]r_at (evaluate, whatever) token by extending the syntax to allow #declare center=<5,3,2>; #declare radius=1; #declare mypigment=pigment{...} sphere { center, radius texture {pigment {color mypigment(center)}}} but I'm not sure whether it would make sense to the average user to see a pigment evaluated at a point like this. Any comments? /*===================================== End of message ===================================== From: Jerry Anning Message-ID: <365FBDA4.C363763@dhol.com> Jerry Anning wrote: > > Here is the source for the Isosurface golden egg I posted in > povray.binaries.images. This uses the Isosurface patch (in this case, > in the SuperPatch). The "5" and "6" could be made variable and the > shape could easily be recast as a macro or as 3.02 isosurface code. The > egg runs from y=-1 to y=1 along the y (up) axis with the narrow end on > top. I modified the formula from a Ken Perlin C snippet. Maybe someone > will find this useful. Oops! Here is the source. // Begin POV code // Isoegg.pov - an Isosurface egg shape #version 3.1; global_settings { assumed_gamma 1.0 ambient_light <.846, 1.041, 1.041> } camera { up <0, 1, 0> right <4 / 3, 0, 0> location <0, 0, -20> look_at <0, 0, 0> } light_source { <20, 50, -100> color rgb <1.103, .993, .772> } #include "colors.inc" #macro Fixcols(Badcol) color rgb filter Badcol.filter transmit Badcol.transmit #end sky_sphere { pigment { Fixcols(CornflowerBlue) } } isosurface { function { 1 - sqrt((x / ((5 - y) / 6)) * (x / ((5 - y) / 6)) + y * y + (z / ((5 - y) / 6)) * (z / ((5 - y) / 6))) } accuracy .0001 max_trace 1 sign -1 method 1 texture { pigment { Fixcols(BrightGold) } finish { specular 1 roughness .0001 metallic brilliance 3 } } scale 5 rotate -15 * x } // End POV code Jerry Anning clem@dhol.com /*===================================== End of message ===================================== From: Jerry Anning Message-ID: <3661B1A8.E0913BF0@dhol.com> Here is an updated version of the Isosurface egg code I recently posted. I turned it into a macro, added bounding, and parametrized it. For an egg, try parameters of 5 and 6. For a tear, try 1.1 and 2. // Begin POV code // Isoegg.pov - an Isosurface egg shape #version 3.1; global_settings { assumed_gamma 1.0 ambient_light <.846, 1.041, 1.041> } camera { up <0, 1, 0> right <4 / 3, 0, 0> location <0, 0, -20> look_at <0, 0, 0> } light_source { <20, 50, -100> color rgb <1.103, .993, .772> } #include "colors.inc" #macro Fixcols(Badcol) color rgb filter Badcol.filter transmit Badcol.transmit #end #macro Egg(A, B) #local C = (2 * A + 1) / (B * 2); isosurface { function { 1 - sqrt((x / ((A - y) / B)) * (x / ((A - y) / B)) + y * y + (z / ((A - y) / B)) * (z / ((A - y) / B))) } accuracy .0001 max_trace 1 bounded_by { box <-C , -1, -C>, } sign -1 method 1 } #end sky_sphere { pigment { Fixcols(CornflowerBlue) } } object { Egg(1.1, 2) texture { pigment { Fixcols(BrightGold) } finish { specular 1 roughness .0001 metallic brilliance 3 } } scale 5 } // End POV code Jerry Anning clem@dhol.com /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <01bdb79a$14bb2ea0$c948a698@default> Here is an interesting isosurface object made with the superpatch for 3.1. It is a cube made up of many checkered boxes. Enjoy! camera{location<3,3,-4>look_at<0,0,0>} light_source{<100,200,-50>rgb 1} #declare Si=3.141592*4 isosurface{ function .5^sin(z*Si)^sin(x*Si)^sin(y*Si) sign 1 threshold 1 texture{pigment{rgb<1 .4 0>}finish{phong 1}} } plane{y,-1 pigment{rgb 1}} MMartin@aol.com /*===================================== End of message ===================================== From: clem@dhol.com (Jerry Anning) Message-ID: <36c3cc44.0@news.povray.org> I came across this neat isosurface accidentally. The nice thing is that is is just one object and renders with reasonable speed and minimal memory hit even on my Paleolithic box. The isosurface function is simply: function { sin(y) + sin(z) - sin(x) } Play with scale, camera, etc and add noise and additional curvature to taste. Jerry Anning clem "at dhol "dot" com /*===================================== End of message ===================================== From: nospam@despam.com (Jerry Anning) Message-ID: <36d479a6.24621457@news.povray.org> On Wed, 24 Feb 1999 23:35:47 +0200, "Margus Ramst" wrote: > >Jerry Anning wrote in message <36d2ed6f.2561587@news.povray.org>... >> >>I coded it as a macro using the parametric object in SuperPatch. For >>some reason, it works fine with exponents of 1.0 (regular torus) but >>gives garbage for any other exponent. Is it the parametric object, >>the equations in the referenced page or my bad coding? I am going to >>redo it as a mesh object with those equations and see what happens. >>If anyone else wants to play with this, here is the macro I used. To >>repeat, it uses the SuperPatch. Sorry about the underscores and >>indenting, Ken! >> > >Arrghh!!!! I can't get it to work at all. >Like this: >isosurface{Supertoroid(1,.3,1,1)} >Error: function is not defined > >Like this: >isosurface{function{Supertoroid(1,.3,1,1)}} >Error: no matching brace in function > >Like this: >#declare S=Supertoroid(1,.3,1,1)} >isosurface{S} >POV crashes (page fault in povray.exe) > >If I add precompute to Supertoroid, the scene renders, but the isosurface is >just a box. >I must admit, this is the first time I tried the parametric{} isosurface, so >i may be doing something real stupid. But the crashing is suspicious. Maybe >a bug? >Help! Hilfe! Aidez-moi! Hjälp! Apua! Appi! (i.e. I'd like some help. please) >Margus. First, the parametric object is an independent type in its own right, not an isosurface function. The macro simply wraps a parametric *object* up and makes it easily usable. Second, there seems to be an issue about using #declare or #local with the parametric object. Every variation of that that I try goes straight to GPF city during the parse. Third, as Ron Parker mentioned, the parametric object seems to want to be first quadrant only. Since the supertoroid has suitable symmetry, you can get around that by making four rotated copies of the object. Since #declare is out, you have to splat four actual copies of the parametric code into a union in the macro. Here is an (ugly, dog-slow) working version of the macro with a demo of how to call it: // Begin POV code // _Rj is major radius // _Rn is minor radius // _E1 and _E2 are exponents #macro Supertoroid(_Rj, _Rn, _E1, _E2) union { parametric { function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(v) ^ _E2) * _Rn <0, 0>, <2 * pi, 2 * pi> <-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>, <_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1> accuracy .001 rotate <90, 0, 0> } parametric { function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(v) ^ _E2) * _Rn <0, 0>, <2 * pi, 2 * pi> <-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>, <_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1> accuracy .001 rotate <90, 0, 0> rotate <0, 90, 0> } parametric { function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(v) ^ _E2) * _Rn <0, 0>, <2 * pi, 2 * pi> <-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>, <_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1> accuracy .001 rotate <90, 0, 0> rotate <0, 180, 0> } parametric { function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)), (sin(v) ^ _E2) * _Rn <0, 0>, <2 * pi, 2 * pi> <-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>, <_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1> accuracy .001 rotate <90, 0, 0> rotate <0, 270, 0> } } #end // End POV code You call it like this: // Begin POV code object { Supertoroid(8, 3, 2, .5) texture { pigment { color Red } normal { dents 2 scale <.1, 3, .2> } finish { specular 1 roughness .002 } } rotate <-30. -30, 0> } // End POV code I will post the mesh version somewhere in a day or so. Should be much faster to render, although slower to parse. Good luck. Jerry Anning clem "at" dhol "dot" com /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <01bd426b$fa3d57e0$116bd3ab@default> Bingo! What I wanted to do more than anything else is to make people aware of the superpatch's ability to make brand-new pigment types from mathematical functions, using the isosurafce. I found the isosurface to be a thing which can be learned, even though I had no previous experience using such math equations. Simple trial and error leads to learning. Fabien Mosen wrote: > Looks like iso-surface with an iso-texture, right ? > > Fabien. Here is the code for all you superpatch users: camera{location<0,5,-10>look_at<0,0,0>angle 35 rotate y*-45} light_source{<100,200,-50>rgb 1.2} sky_sphere{pigment{gradient y color_map{[0 rgb 1][1 rgb<.3 .7 1>]}}} isosurface{ function sqr(x+sin(z*2))+y^2+.5 bounded_by{box{<-2,-1,-4>,<2,0,4>}} sign 1 threshold 1 pigment{ function sqr(x+sin(z*2))+y^2+.49 frequency 8 color_map{[0 rgb<.3 .3 .15>][1 rgb<.9 .9 .8>]}} finish{phong 1} } /*===================================== End of message ===================================== From: Thomas Willhalm Message-ID: "Chris Capel" writes: > This would help, except that I can not for my life figure out how to use the > noise3d function in conjunction with the rounded_box function. Could you > perhaps give an example of this? Hmmm. There is a problem that didn't see previously: The rounded_box function uses the bounding box to determine its size. That's why the combination with noise3d isn't straight forward. It is however simple to redefine the superquadric ellipsoid with the isosurface patch. This function can than be modified. An example of a stone is given below. Thomas // ---------------------------- start pov scene ---------------------------- camera { location<15,40,-35> direction<0,0,5.5> look_at<0,0,0>} light_source {<-50, 40, -20> color <1,1,1>} light_source {< 0, 50, -50> color <1,1,1>} background {color <0.65,0.72,0.72>} #declare P0=0.2 #declare P1=0.2 #declare BOX = function { ( abs(x)^(2/P0) + abs(y)^(2/P0) ) ^ (P0/P1) + abs(z)^(2/P1) - 1} #declare RUSTY_BOX = function{ BOX(x,y,z) + 0.2*noise3d(40*x,40*y,40*z) } isosurface { function { RUSTY_BOX } bounded_by{ box {<-1.1, -1.1, -1.1>, <1.1, 1.1, 1.1>}} eval threshold 0.18 method 2 pigment {colour <0.65,0.3,0.1>} finish {ambient 0.3} scale 3 } // ---------------------------- end pov scene ---------------------------- -- http://www.fmi.uni-konstanz.de/~willhalm /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <01bea8c7$73d5c3e0$cadcc998@default> O.k. I just had to do it. It is much easier to make this mathematical shape using isosurfaces. It renders a lot quicker, and is smoother, too. I made a pigment to cover the object using another mathematical function. By the way, I'm not all that great at math. I would be glad to hear any questions or comments you might have. -- SamuelT STBenge@aol.com You need to have the superpatch installed to use this code: camera{location<0,8,-10>look_at<0,0,0> angle 45 rotate y*-40} #declare V=7; light_source{<100,200,-50>,<1.2 1.2 1.15>} #declare Shape= isosurface{ function sin(x*4)/4+sin(z*4)/4+y-.5 threshold 1 sign 1 bounded_by{box{<-3,-1,-3>,<3,2.5,3>}} } difference{ #object{Shape} #object{Shape scale 1.0001 translate y*-.5} pigment{function sin(x*4)+sin(z*4) sine_wave color_map{[0 rgb<0 0 1>][1 rgb 1]}}finish{phong 1 phong_size 80} } plane{y,.5 pigment{rgb 1}normal{granite 2 scale 4}} [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\isosine.jpg] end /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <01beaa0d$dd90be60$8badc998@default> No, it's not an advertisement! It's another isosurface I made. I "blobbed" a plane with follicles which increase in radius near the center and came out with this image. It rendered in about 17 minutes on my P166 machine. Questions, comments, and criticisms are always appreciated. -- SamuelT STBenge@aol.com To render this code all you need is the superpatch. I have no idea where to get it. You used to be able to get it at www.twysted.net, but that site is down or something. //***********CODE*********** global_settings{ambient_light 0} camera{location<0,8,-10>look_at<0,0,0> angle 45 rotate y*-30} light_source{<50,100,-25>,<1.4 1.4 1.1> spotlight point_at<0,0,0> radius 1 falloff 2} light_source{<-1000,1000,500>,<.1 .4 .7>} isosurface{ function (sqr(sin(x*4+sin(y*2))*2)+sqr(sin(z*4)*2)+(y/16+(sqr(z/3)+sqr(x/3))))*(y+1) threshold 1 sign 1 bounded_by{box{<-15,-3,-6>,<6,5,16>}} pigment{rgb<.8 1 1>}//finish{phong 1 phong_size 80} } [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\follicles.jpg] end /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37851e51@news.povray.org> On 8 Jul 1999 17:31:34 -0400, Ron Parker wrote: >On Thu, 8 Jul 1999 18:45:17 +0100, Mick Hazelgrove wrote: >>Apart from the obligatory nag about the superpatch update :) I have a >>request/query >> >>Do you remember the thread about noise and basic shapes so months ago? >> >>Well is possible to add noise and to HFs? not in the sense of graphic noise >>but in a way similar to that the isopatch uses. >> >>If so, if it's easy to add, can we have it? > >I'm not sure what you mean. Are you wanting to add a higher-frequency >noise to a lower-frequency heightfield (i.e. more than one noise sample >per pixel)? > >There is a way you can fake it with the iso patch, though it's probably >kinda slow. The 3.1e superpatch has a pigment function that, afaik, >should work with an interpolated imagemap to give you a nice isosurface >approximation of a heightfield. Once you get that working, you can >then add any function you want to it, including noise. Here's a sample showing what I mean. For some reason the bilinear interpolation doesn't seem quite as useful as I thought it would, but here ya go anyway. You should substitute your own heightfield where I have sphere.bmp. The .001 is used to chop off the planar surface that would otherwise be generated by the black background in my test image. //--------- cut here ----->8======= camera {location <0,3,-3> look_at 0} light_source {<-20,20,-20> rgb <.8,.8,1>} light_source {<20,20,-20> rgb <1,.8,.8>} #declare xx=function{ pigment { image_map { sys "sphere.bmp" interpolate 2 } rotate 90*x } } isosurface { function{y-xx(x,y,z)+.001+.05*noise3d(20*x,20*y,20*z)} bounded_by {box {0,1}} eval translate -.5 scale 3 texture { pigment {color rgb 1} finish {ambient .3} } } //--------- cut here ----->8======= /*===================================== End of message ===================================== From: "ingo" Message-ID: <378a6aa3@news.povray.org> I'm not sure wether I've seen it here before, but I know a lot of people asked for spherical height fields. The picture isn't a beauty, just took Mick's terrain and mapped it on an isosphere. #declare Pic= function{ pigment { image_map { tga"terrain" interpolate 2 map_type 1 } } } #declare R0=1; #declare FUNC1=function {"sphere",} isosurface { function{FUNC1(x,y,z)-(Pic(x,y,z)/5)} bounded_by {sphere {0,2.2}} method 2 max_gradient 10 texture{ pigment {rgb < 0.9, 0.8, 0.2>} finish {phong 0.4} } } ingo -- Met dank aan de muze met het glazen oog. [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\HFsphere.jpg] end /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <378AD62F.C63F78F7@aol.com> This is a multi-part message in MIME format. --------------F8622723F5F714D1452ADB4C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit After seeing the spherical height_field, I became deeply intrigued. I tried it with my Superpatch 3.1a, and it didn't work. I searched the patches section of this newsgroup until I found the new version. This image is the result of what I have learned so far. A sphere+crackle. Doing it is very easy, but it is slow. This image took 11 minutes and 23 seconds on my P166. Not real great time, but for the effects, I think it is worth it! Samuel Benge //Code: #declare Pig= function{ pigment{crackle scale .5 color_map{[0 rgb 1][1 rgb 0]}} } isosurface{ function (x^2+y^2+z^2)+(Pig(x,y,z)*.5) method 2 threshold 1 sign 1 max_gradient 10 pigment{rgb<1 .6 .3>} finish{phong 1} } --------------F8622723F5F714D1452ADB4C Content-Type: image/jpeg; name="redrock.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="redrock.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\redrock.jpg] --------------F8622723F5F714D1452ADB4C Content-Type: text/x-vcard; charset=us-ascii; name="STBenge.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for SamuelT. Content-Disposition: attachment; filename="STBenge.vcf" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\STBenge25.vcf] --------------F8622723F5F714D1452ADB4C-- /*===================================== End of message ===================================== From: "Zeger Knaepen" Message-ID: <378d224d@news.povray.org> Mike heeft geschreven in bericht <378D04AA.DC07C6E7@aol.com>... >First, tell me that was done with POV, and secondly, tell me how you did >it. :) 1st: "that was done with POV" However the Superpatch version 3.1e 2nd: Isosurface-spherical-heightfield. Wait, I'll search the code... Here it is. I know this isn't the right NG, sorry. #declare Pig= pigment { image_map { gif "map.gif" map_type 1 interpolate 2 } } } isosurface{ function (x^2+y^2+z^2)+(Pig(x,y,z)*.7) method 2 threshold 1 sign 1 max_gradient 10 texture { pigment { wrinkles color_map { [0 rgb .5] [.8 rgb .6] [.9 rgb .3] [1 rgb .7] } turbulence .8 lambda 3 scale <.5,.1,.5> } finish{diffuse .8 brilliance 1.5 specular .2 roughness .01 metallic .5} } rotate -y*80 } camera { location -z*2 +y*2 look_at 0 } light_source { <5000,5000,-5000> rgb 1 } /*===================================== End of message ===================================== From: "ingo" Message-ID: <379caae1@news.povray.org> // ======================== // First scene: for creating the df3-file // +w is equal to +h, use best possible aa // make an animation +kfi0 +kfi99 #version 3.1; global_settings {assumed_gamma 1.0} camera { location <0.0, 0.0, -3.0> look_at <0.0, 0.0, 0.0> right x // square aspect ratio angle 90 orthographic } // Input between 0 and 1. #macro Imm(Min,Max,Input) (Min+((Max-Min)*Input)) #end //macro #declare Check= pigment { checker colour rgb 1, colour rgb 0 } plane { -z,0.0 pigment { boxed scale 2 pigment_map { [0, rgb 0] [0.001, Check scale Imm(0.5,1,clock)] } rotate <0,0,Imm(0,90,clock)> } finish {ambient 1} } // ======================== // Second scene: Making the Iso-object // Needs the Superpatch 3.1e !! #version 3.1; #include "colors.inc" #include "woods.inc" global_settings {assumed_gamma 1.0} light_source { <500, 500,-500> rgb 1 } light_source { <-500, 500,-500> rgb 0.5 } camera { location <2, 1.0,-2.0> look_at <0.5, 0.2, 0.0> } #declare Thing= isosurface{ function { pigment { density_file df3 "isosph.df3" interpolate 1 translate -0.5 } } bounded_by {box{-0.5,0.5}} threshold 0.5 sign -1 max_gradient 1000 method 2 scale <1,1,2> texture {T_Wood10} } object {Thing} object { Thing rotate <0,180,0> translate <0.9,0.7,1.2> } /*===================================== End of message ===================================== From: "Andrew Cocker" Message-ID: <37a08010@news.povray.org> Hi all, Apologies if this is not the best places to ask this question ( I'm only subscribed to .general and .binaries.images at the moment ). I've just downloaded the latest superpatch ( thanks Ron ), and have a couple of questions, mostly relating to the isosurface function. Firstly, I modified Gilles Tran's Egg scene as follows. I wanted to use splines to change a couple of the values, but I always get an error. After this, I have to restart POV as it will not render any other isosurface. I initially tried using Colefax's AutoClck.mcr to change the same values, but that didn't work either. Is there a problem with using declared variables within an isosurface function? I *really* want to be able to animate isosurfaces. Also, where can I get more information on how they work, or more specifically to explain the mathematic gibberish that resides inside the function statement :-) ? #declare pos1=spline { linear_spline 0, 0.04 1, 0.4 } #declare pos2=spline { linear_spline 0, 0.04 0.5, 0.4 1, 0.04 } #declare Egg=isosurface { function{ sqrt(x*x +y*y*0.5 +z*z) -5 + noise3d(x*1,y*1,z*1)*pos1 + noise3d(x*6,y*6,z*6)* pos2 -0.125} bounded_by{ box {-7,7}} eval threshold 0 method 2 scale 1 } Secondly, I can't work out how to access the inbuilt isosurface functions that the doc says are in there ), like sphere, superellipsoid etc. Can anyone help? Thanks in advance for your suggestions. Andy Cocker /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37a08b84@news.povray.org> [crossposted from povray.general] On Thu, 29 Jul 1999 12:41:36 +0100, Andrew Cocker wrote: >Apologies if this is not the best places to ask this question ( I'm only >subscribed to .general and .binaries.images at the moment ). povray.unofficial.patches is generally considered the best place for these questions. I've set followups to there. [...] >Firstly, I modified Gilles Tran's Egg scene as follows. I wanted to use >splines to change a couple of the values, but I always get an error. After >this, I have to restart POV as it will not render any other isosurface. Well, that clearly shouldn't happen. I'll have to look at that one. >I initially tried using Colefax's AutoClck.mcr to change the same values, >but that didn't work either. Is there a problem with using declared >variables within an isosurface function? I *really* want to be able to >animate isosurfaces. Keep in mind that splines are not declared variables. They're closer to macros than to variables. To use one, you'll probably have to declare a variable first. Try this: ----------- cut here -------->8========== #declare pos1=spline { linear_spline 0, 0.04 1, 0.4 } #declare pos2=spline { linear_spline 0, 0.04 0.5, 0.4 1, 0.04 } #declare vpos1 = 0+pos1(clock); #declare vpos2 = 0+pos2(clock); #declare Egg=isosurface { function{ sqrt(x*x +y*y*0.5 +z*z) -5 + noise3d(x*1,y*1,z*1)*vpos1 + noise3d(x*6,y*6,z*6)* vpos2 -0.125} bounded_by{ box {-8,8}} eval threshold 0 method 2 scale 1 } ----------- cut here -------->8========== >Also, where can I get more information on how they work, or more >specifically to explain the mathematic gibberish that resides inside the >function statement :-) ? An isosurface is the surface formed when you put an infinitesimal dust mote at each and every point where a function is equal to a specific value. In the case of the egg, the function is that of an ellipsoid, modified by a couple of noise functions at different scales. Any decent 3d geometry book or website should be able to help you with the equations. >Secondly, I can't work out how to access the inbuilt isosurface functions > that the doc says are in there ), like sphere, superellipsoid etc. Can >anyone help? The syntax is tricky and I messed up the documentation as well. The proper syntax is like this: function{ "sphere" <5> } Both the quotes and the angle brackets are necessary. /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <37A36668.E3F85BA3@aol.com> This is a multi-part message in MIME format. --------------A1BA1DA4650E32B8BAFC3C8B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here is the code for the screw-shaped object. The example image is at the images section of this newsgroup. Hey, look! I indented my code! ;) Beware of any line-wrapping that may occur if you paste this cose into your pov scene. Samuel Benge //This Code Requires That You Use Superpatch Version 3.1e //This pigment will warp the isosurface object. The triangle_wave gives us the sharp, saw-toothed surface. #declare P1=function{pigment{spiral1 12 rotate x*90 scale y*.25 triangle_wave color_map{[0 rgb<1 0 0>][1 rgb<0 1 0>]}}} isosurface{ function{ (P1(x,y,z)*.1) //This is how you initialize the pigment within the function. The *.1 is how strong the pigment will affect the isosurface. +(x^2+z^2+.5) //This is a basic cylinder along the y-axis. The +.5 shrinks it slightly. } threshold 1 sign 1 accuracy .015 //I found this value optimal for working with isosurface pigment functions. method 2 max_gradient 5 pigment{rgb .3} finish{specular 1 reflection .6} hollow } --------------A1BA1DA4650E32B8BAFC3C8B Content-Type: text/x-vcard; charset=us-ascii; name="STBenge.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for SamuelT. Content-Disposition: attachment; filename="STBenge.vcf" [This section was removed and saved as file d:\Agent\news.povray.org\attached\STBenge9.vcf] --------------A1BA1DA4650E32B8BAFC3C8B-- /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37a9c0d1@news.povray.org> On Thu, 05 Aug 1999 12:21:37 -0400, Lummox JR wrote: >BTW, I'd like to see the new isosurface files if possible; an addition >of r, theta, and phi will likely force some modifications to my >function-normal code. You can get them from R. Suzuki's website if you really want them. I'm not sure what effects it will have on you, though. The changes seem to be limited to isofunc.c and are in the form of new internal functions: static DBL R(FUNCTION *Func,VECTOR XYZ) { return( sqrt(x*x + y*y + z*z ) ); } static DBL TH(FUNCTION *Func,VECTOR XYZ) { return( atan2(x,z) ); } static DBL PH(FUNCTION *Func,VECTOR XYZ) { return( atan2(sqrt(x*x + z*z ),y) ); } These functions are then added to the function table and used thusly: (this example was taken from R. Suzuki's site and modified to actually render. He seems to have made the (x,y,z) optional in his version, but I can't see where he did it, and my code is too much unlike his to do much in the way of diffs anymore.) #declare TH=function{"TH"} #declare R=function{"R"} #declare PH=function{"PH"} isosurface { function{cos(TH(x,y,z)*7)*0.2+min(abs(R(x,y,z)-1.5),abs(R(x,y,z)-3))+y*y} bounded_by{ box {<-3.7, -0.5, -3.7>, <3.7, 0.5, 3.7>}} threshold 0.5 accuracy 0.02 max_gradient 1.7 pigment {colour <0.8,0.5,0.2>} finish {ambient 0.2 phong 0.2} scale <1.25,1,1.25> } /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37b05bc8@news.povray.org> On Tue, 10 Aug 1999 09:23:48 -0700, Josh English wrote: >If this was a cube type puzzle it'd be fairly easy to solve...b ut it would >look damn cool. >I'm thinkging futuristic appliances. The toaster of the future. If you can >get one side to tile across a plane you could make a nice cushion wall. Lots >of potential. To that end, try mating it with this scene (and prepare to wait a horribly long time). I think you need Lummox JR's patch to make this work. camera { location <0,5,-10> look_at 0 } light_source {<-20,20,-20> rgb 1} #declare mod2=function{ x-2*floor(x/2) } #declare sph=function{ sqr(x)+sqr(y)+sqr(z)-.25 } isosurface { function{ sph(mod2(x,0,0)-1,mod2(y,0,0)-1,z) } method 2 max_gradient 30 bounded_by {box {<-10,-10,-10><10,10,10>}} texture { pigment {color red 1} finish {ambient .2} } } /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37b096e3@news.povray.org> On 10 Aug 1999 13:05:12 -0400, Ron Parker wrote: >On Tue, 10 Aug 1999 09:23:48 -0700, Josh English wrote: >>If this was a cube type puzzle it'd be fairly easy to solve...b ut it would >>look damn cool. >>I'm thinkging futuristic appliances. The toaster of the future. If you can >>get one side to tile across a plane you could make a nice cushion wall. Lots >>of potential. > >To that end, try mating it with this scene (and prepare to wait a horribly >long time). I think you need Lummox JR's patch to make this work. Better yet, try this one that doesn't need anything but the current superpatch: camera { location <0,5,-10> look_at 0 } light_source {<-20,20,-20> rgb 1} #declare sph=function{ sqr(x)+sqr(y)+sqr(z)-.25 } isosurface { function{ sph((x+100)%2-1,(y+100)%2-1,z) } method 2 max_gradient 30 accuracy .1 bounded_by {box {<-10,-10,-10><10,10,10>}} texture { pigment {color red 1} finish {ambient .2} } } /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <37B0FEBD.8AAF72B4@aol.com> This is a multi-part message in MIME format. --------------CA1A41478B51856570AF3554 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here's how I would have tackled that: isosurface{ function sqr(sin(x)*1.5)+sqr(sin(y)*1.5)+sqr(z*1.5) threshold 1 sign 1 pigment{rgb 1} } You've made me interested in what % might be used for in the function. Samuel Benge Ron Parker wrote: > Better yet, try this one that doesn't need anything but the current superpatch: > > camera { location <0,5,-10> look_at 0 } > light_source {<-20,20,-20> rgb 1} > > #declare sph=function{ sqr(x)+sqr(y)+sqr(z)-.25 } > > isosurface { > function{ sph((x+100)%2-1,(y+100)%2-1,z) } > method 2 > max_gradient 30 > accuracy .1 > > bounded_by {box {<-10,-10,-10><10,10,10>}} > > texture { > pigment {color red 1} > finish {ambient .2} > } > > } --------------CA1A41478B51856570AF3554 Content-Type: text/x-vcard; charset=us-ascii; name="STBenge.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for SamuelT. Content-Disposition: attachment; filename="STBenge.vcf" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\STBenge50.vcf] --------------CA1A41478B51856570AF3554-- /*===================================== End of message ===================================== From: Michael Andrews Message-ID: <37B45DCA.BDBDC136@reading.ac.uk> Mark Wagner wrote: > I'm currently trying out methods of creating 3D solid clouds using > isosurfaces, and not having much luck. > > Mark Hi Mark, I've been trying media filled isosurface clouds again recently but gave up when I discovered I was getting a whole 0.75 PPS (calculated from the time taken to do about 10% of the image :-/ ) on a PII-350. I guess I'll have to wait until I can buy myself a 600MHz Athlon system. Have you seen the reviews these systems are getting? A 3D Studio MAX benchmark gave a speed ~40% higher than a PIII-600!!! Please 'scuse me while I wipe the drool of my desk ... Anyway, back to clouds. The way I'm trying at the moment is using a ridged fractal type function: #declare cloudFn3 = function { min(1, max(0, abs(4*noise3d(x,y,z)-2)+ 0.5*abs(4*noise3d(x*3,y*3,z*3)-2)+ 0.25*abs(4*noise3d(x*9,y*9,z*9)-2)+ 0.125*abs(4*noise3d(x*27,y*27,z*27)-2)- 1.875 ) ) } Constrain this to a spherical shell (it's around a planet I'm building): #declare baseVal = cloudBase/cloudTop; #declare topVal = 1; #declare midVal = 0.25*(baseVal*3+topVal); #declare cloudFn1 = function { pigment { spherical frequency -1 colour_map {[baseVal rgb 0][midVal rgb 1][topVal rgb 0]} } } Then build a density: #declare S = cloudTop/(3*cloudDepth); density { function { max(0,min(1,cloudFn1(x,y,z)+cloudFn3(x*S,y*S,z*S)-1))* max(0,min(1,z*cloudBase*0.05)) } colour_map {[0.1 rgb 0][0.2 rgb 1]} } This is the function I was trying to build an isosurface of and got nowhere. I had to change the inherent scale to get even the 0.75 PPS: #declare S = 1/(3*cloudDepth); #declare T = 1/cloudTop; isosurface { function { max(0,min(1,cloudFn1(x*T,y*T,z*T)+cloudFn3(x*S,y*S,z*S)-1))* max(0,min(1,z*0.05)) } eval max_trace 10 threshold 0.1 sign -1 bounded_by { sphere { 0, cloudTop*1.01 } } } At the moment I have a small render of the density function running, going at 5 PPS. Mind you, this has got an atmosphere media as well ... Well, there's my Friday evening ramblings on the subject. Some may be useful. Bye for now, Mike Andrews. /*===================================== End of message ===================================== From: Kevin Wampler Message-ID: <37B5A9A7.5F721257@tapestry.tucson.az.us> //This scene needs Superpatch to render camera { location <-2, 3, -6>*4 direction 2.0*z up y right 4/3*x look_at <0, 3, 0> } light_source { 0*x color rgb <1,1,1> translate <-2000, 4000, -3000> } sky_sphere { pigment { gradient y color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] } } } plane { y, -50 texture { pigment { color rgb <1,.9,.8> } } } cylinder { <3,-10,15> <3,5,15>, 1 texture { pigment { color rgb <1,1,1> } normal { wrinkles .1 scale <.1,1,.1> } finish { specular .2 roughness .035 } } } //*************************************************Sand**************************************************** #declare Sand = function { y+.2*z+noise3d(x/10,0,z/10) } #declare Sandtex = texture { pigment { color rgb <1,.9,.8> } } isosurface { function { Sand } max_gradient 5 bounded_by { box { <-1000,-11,-1000>, <1000,2,1000> } } texture { Sandtex } } //*************************************************Water*************************************************** #declare Waves = function { pigment { marble color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] } scale 3 } } #declare Water2 = function { .2*(-y+1)*noise3d(.5*x,.5*y,.5*z)^2+.04*noise3d(2*x,2*y,(2*y+1)*z) } #declare Water = function { y-Waves(.1*x+.25*y,y,z)^2+.005*noise3d(1*x,1*y,3*z)-Water2(x,y,z) } #declare Sea = texture { pigment { color rgbt <1,1,1,1> } finish { specular .5 roughness .005 reflection_type 1 } } #declare Foam = texture { pigment { crackle color_map { [ 0 color rgbt <1,1,1,0> ] [ 1 color rgbt <1,1,1,.6> ] } turbulence .5 scale .5 } normal { bumps .2 scale .1 } finish { specular .5 roughness .005 } } #declare Watertex = texture { function { max(0,min(1,Sand(x,y,z))) } texture_map { [ 0 Foam ] [ .5 Sea ] [ 1 Sea ] } } #declare Waterint = interior { ior 1.33 caustics 10 fade_distance 3 fade_power 2 } isosurface { function { Water(x,y,z) } max_gradient 10 bounded_by { box { <-1000,-100,-1000>, <1000,2,1000> } } texture { Watertex rotate <0,-90,0> } interior { Waterint } rotate <0,90,0> hollow } /*===================================== End of message ===================================== From: David Heys Message-ID: <37C1E489.68910B68@hotmail.com> I agree! Your examples and tutorial finally prompted me to download the Superpatch. I've been playing around with it and it's quite interesting, but also very frustrating. I kind of feel like a blindfolded gunman who has been spun around and told to shoot at the target. I don't have enough confidence in my math abilities at the moment to be able to predict the results of my experiments once they go beyond the simple sphere/cylinder/superellipsoid. Any suggestions, tutorials, sample forumlae, etc.. would be welcome. Most of my results, though interesting, seem to end up being infinite (or seem so) in size. :{P I "did" get an interesting effect with this: difference { isosurface{ function{ abs(cos(x)+cos(z)+sin(y))} threshold 0.25 sign 1 bounded_by{sphere {0,80}} hollow } torus {85,30 hollow} pigment {rgb<(63/255),(38/255),(7/255)>} finish {specular 0.76 roughness 0.075 ambient 0.54 diffuse 0.62} } I have a question on this as well. I'll post an image in binaries.images. I tried plunking a light inside this object. Light pours out quite nicely onto the plane that intersects the object, but does not shine within (even with a Hollow added to the isosurface and torus). It's almost as if the "holes" in the object let light pass through, but not impact upon the interior of the object. Am I wrong in this? David /*===================================== End of message ===================================== From: David Heys Message-ID: <37C1E792.BFD0CC8C@hotmail.com> This is a multi-part message in MIME format. --------------8738801D5E9DB1B339BA6FB3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I've finally dowloaded the Superpatch and have been fiddling around with the isosurface functions. I have to admit that it's most maddening. More a case of hit or miss than anything else. Anyhow, I got an interesting effect with this: difference { isosurface{ function{ abs(cos(x)+cos(z)+sin(y))} threshold 0.25 sign 1 bounded_by{sphere {0,80}} hollow } torus {85,30 hollow} pigment {rgb<(63/255),(38/255),(7/255)>} finish {specular 0.76 roughness 0.075 ambient 0.54 diffuse 0.62} } I have a question on this though. I tried plunking a light inside this object. Light pours out quite nicely onto the plane that intersects the object, but does not shine within (even with a Hollow added to the isosurface and torus). It's almost as if the "holes" in the object let light pass through, but do not impact upon the interior of the object. Am I wrong in this? David --------------8738801D5E9DB1B339BA6FB3 Content-Type: image/jpeg; name="Iso1.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="Iso1.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\Iso11.jpg] --------------8738801D5E9DB1B339BA6FB3-- /*===================================== End of message ===================================== From: Fabien Mosen Message-ID: <37C59F14.6DFC08E@skynet.be> Bill DeWitt wrote: > > Very interesting! > > More for me to try to learn while I should be doing something more > productive... is it possible for you to post a short example of how this is > implemented? I think I saw the explanation as I was skimming the docs, but a > snippet is worth a thousand words. #declare Pig1= //defines the "displacement pattern", with a greyscale function{ pigment{ waves //use any pattern you want color_map{[0 rgb 1][1 rgb 0]} scale .3 //use any transformation needed } } #declare grad=15 //increase to get rid of speckles, in some cases #declare Plane1= isosurface{ function (x*0+y*1+z*0) //this is the equation of the flat plane +(Pig1(x,y,z)*.3) //this adds the "displacement", the multiplier (.3) controls //the "depth" of it. method 2 //check the manual about the isosurface, I'm not an expert ! threshold 1 sign 1 max_gradient grad } object {Plane1 pigment {rgb <.7,.65,1>} finish {phong .8}} /*===================================== End of message ===================================== From: "Bill DeWitt" Message-ID: <37c67737@news.povray.org> Chris Huff wrote : > > Try using the eval option and/or method 2. A speed > improvement as well as no speckles, but with no loss of accuracy. > Hmmm... Speckles... could that be what I am experiencing? I do test renders with mosaic preview and I get a grid of clear spots in my surface. Even worse, I have one that will render speckly with mosiac, but not render at all with standard rendering! In mosaic it starts by not rendering the top, then fills in with a grid of spots. In standard rendering it just renders the base. Here's the code, is it just me? ////////////// Camera camera { // right < -1.333, 0.0, 0.0 > // up < 0.0, 1.0, 0.0 > // direction < 0.0, 0.0, 1.0 > // location < 1.0, 0.5, 1.0 > // look_at < 0.5, 0.0, 0.5 > // } // ////////////// end Camera /////////////// Light light_source { < -50, 100, 10 > color rgb < -1.0, 1.0, 1.0 > } ////////////////// /////////////// Light light_source { < 50, 100, 50 > color rgb < -1.0, 1.0, 1.0 > } /////////////// global_settings { max_trace_level 100 } #declare Pig1= function{ pigment{ crackle color_map{ [0.0 rgb 1] [0.5 rgb 2] [1.0 rgb 0] } scale .5 turbulence 0.5 } }/// ///////////////// isosurface { function{ sqr(sin(y*15)+(x*22)) +sqr(sin(z* 2)+(z*22)) +(y*10) +cub(y*5) +Pig1(x*15, y*5, z*15) } sign 1 eval method 2 threshold 1 translate < 0.0, 0.0, 0.0 > pigment { rgb < 0.2, 0.8, 0.3 > } } ///////////////// /*===================================== End of message ===================================== From: Matthew Corey Brown - XenoArch Message-ID: <37C70614.C9385530@xenoarch.com> This is a multi-part message in MIME format. --------------FDE7FA09168F13EA561E0E14 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This image was the reason i wrote the addition of using pigments in iso surfaces. The moons are an iso surface with a spherical imagemap to distort the surface as a displacement map. example moon macro: #macro Moon(Loc,Scale,Rotate,File,FTrans) #declare Bump=function{ pigment{ image_map{ tga File map_type 1 interpolate 2 } } } #declare Sphere=function {"Sphere",<0.998>} isosurface{ function{ Sphere(x,y,z) -(Bump(x,y,z))*0.04 } //max_gradient 1.1 eval accuracy 0.01 bounded_by {sphere{0,1.05}} pigment { function {Bump(x,y,z)} color_map { [0.35 rgb 0.5] [0.4 rgb 0.8] } } finish { diffuse 1 ambient 0 crand 0.01 specular 0.4 brilliance 0.7 roughness 0.1 } rotate Rotate.y*y rotate Rotate.z*z rotate Rotate.x*x scale Scale translate Loc } #end The Ocean was also made with iso_pigments: #local Waves=function{ pigment{ wrinkles scale <10,20,17> color_map{ [0 rgb 1] [1 rgb WH] } } } #local Ocean=function{ Sphere(x,y+4000,z) +Waves(x,y,z)/3 } isosurface{ function{ Ocean(x,y,z) } max_gradient 1.1 accuracy 0.004 bounded_by {sphere{-4000*y,4000}}//+WH+0.01}} texture{Water} } --------------FDE7FA09168F13EA561E0E14 Content-Type: image/jpeg; name="twilightconj.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="twilightconj.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\twilightconj.jpg] --------------FDE7FA09168F13EA561E0E14-- /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37ce9813@news.povray.org> On Thu, 2 Sep 1999 17:06:21 +0200, Gail Shaw wrote: >Can anyone tell me how the built in isosurface function helix1 >works. I tried > >isosurface { > function { "helix1" <2,1,0.2,1,0,1,0> } > threshold 1 > sign 1 > pigment {Red} >} > >but just got a cylinder. > >Any help will be appreciated. Try this: isosurface { function { "helix1" <2,1,0.2,1,1,1,0> } threshold 0 max_gradient 20 method 2 bounded_by {box {-10,10}} sign 1 pigment {red 1} finish {ambient .4} } Most of the internal functions are designed to work with a threshold of zero. By default, they're bounded by a small box, so you need to add a bounding volume if you want to see anything interesting. I also added the max_gradient 20 method 2 to eliminate some gaps in the result. Finally, the docs for parameter 4 ("shape parameter") are useless, but a little playing shows that it is the ratio of height to width for the ellipses the "strands" are made out of. Zero is a bad number, and will in fact crash on some architectures. Replacing it with a one gives you a circular cross-section, which is what I assume you wanted. I'll try to remember to fix this in the next version of the docs. /*===================================== End of message ===================================== From: "Mark Wagner" Message-ID: <37ec585f@news.povray.org> I propose that this be adopted as the official POV-Ray SuperPatch Benchmark. It is superior to the SkyVase image for the purpose of benchmarking the SuperPatch, as it uses some SuperPatch specific components. Mark #include "colors.inc" global_settings { assumed_gamma 1.0 max_trace_level 25 } #declare lightDir = vnormalize(<-0.25,3.1,-4>); #declare lightLen = 1.5e8; camera { up <0, 1, 0> right <4/3, 0, 0> location <0.0, .15, -.75> direction <0.0, 0.0, 1> angle 60 look_at <0,3,20> } light_source { 0*x colour rgb 1 translate lightDir*lightLen media_attenuation on } #declare baseRad = 6371.0; #declare grndRad = baseRad; #declare cloudDepth = 4; #declare cloudBase = baseRad+2; #declare cloudTop = cloudBase + cloudDepth; #declare baseVal = cloudBase/cloudTop; #declare topVal = 1; #declare midVal = 0.25*(baseVal*3+topVal); #declare cloudFn1 = function { pigment { spherical frequency -1 colour_map { [baseVal rgb 0] [midVal rgb 1] [topVal rgb 0] } } } #declare cloudFn3 = function { min(1, max(0, abs(4*noise3d(x,y,z)-2)+ 0.5*abs(4*noise3d(x*3,y*3,z*3)-2)+ 0.25*abs(4*noise3d(x*9,y*9,z*9)-2)+ 0.125*abs(4*noise3d(x*27,y*27,z*27)-2)- 1.875 ) ) } #declare S = cloudTop/(3*cloudDepth); isosurface{ function{ (cloudFn1(x,y,z)+cloudFn3(x*S,y*S,z*S)-1)*max(0,min(1,z*cloudBase*0.05)) } eval max_trace 10 method 2 threshold 0.1 sign -1 bounded_by { sphere { 0, cloudTop*1.01 } } pigment{rgb 1} finish{ ambient .7 diffuse .3 } no_shadow } sphere { 0, grndRad pigment { color rgb <80,90,94>/255.0 } finish { diffuse 0.2 ambient 0.05*<80,90,94>/94 specular 0.3 roughness 0.001 reflection .5 brilliance 0.01 } normal{ bozo normal_map { [ 0.00 waves 0.050 translate -0.5 rotate -132 scale 1000*baseRad frequency 500*baseRad] [ 0.70 ripples 0.025 translate -0.5 rotate 213 scale 1000*baseRad frequency 1000*baseRad] [ 0.85 waves 0.015 translate -0.5 rotate 23 scale 1000*baseRad frequency 1000*baseRad] [ 1.00 ripples 0.005 translate -0.5 rotate 73 scale 1000*baseRad frequency 2000*baseRad] } scale 1/100 scale 1/50 warp { turbulence 1/5 octaves 2 lambda 5 omega 1/5 } warp { turbulence -1/5 octaves 2 lambda 5 omega 1/5 } scale 50 } translate -baseRad*y } /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37f248fc@news.povray.org> On Wed, 29 Sep 1999 18:23:51 +0200, Rico wrote: >Hi all, > >I would like to know if it's possible to define a box as an isosurface ? > >In other words, is it possible to create realistic bricks with boxed >isosurfaces and some "noise" (granite for example) ? Try this: #declare c1=<-2,-1,-3>; #declare c2=<1,3,2>; #declare x1 = c1.x; #declare y1 = c1.y; #declare z1 = c1.z; #declare x2 = c2.x; #declare y2 = c2.y; #declare z2 = c2.z; isosurface { function {((x-x1)*(x-x2))&((z-z1)*(z-z2))&((y-y1)*(y-y2)) + .2*noise3d(5*x,5*y,5*z)} threshold 0 bounded_by { box {-5,5}} texture { pigment {color rgb 1} finish {diffuse .5 specular .3 ambient .2 roughness .001} } } light_source { <-20,20,-20> rgb <1,.8,.8>} light_source { <20,20,-20> rgb <.8,.8,1>} camera {location <2,5,-12> look_at 0 } /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <37F2C3EA.BE607246@aol.com> TonyB wrote: > >And this is fun, heh heh heh: > > > >pigment{function > >abs((noise3d(x*2,y*4,z*4)*.875)&(noise3d(x*4,y*2,z*4)*.875)&(noise3d(x*4,y* > 4,z*2)*.875)) > >poly_wave} > > Did you just make that up? =) > Not just last night, but many nights ago. I was trying to make a fast-rendering texture that simulated the effect that crackle and granite has, that is, the "partitions" that make those pigments so neat. > What happened to the part of your tutorial where you say that you can blob 2 > torii? It's not made yet. I need to find a free weekend in order to make more tutorials. > How do you do that? I want to do boxes and spheres right now. Well, my brief description is to make cubes and spheres using functions, and adding them together using multiplication symbols. Each piece must be inside of brackets ( ). So you would do something like this: isosurface{ function (x^2+y^2+z^2)*(abs(x)+abs(y)+abs(z)) threshold 1 sign 1 pigment{rgb 1} finish{phong 1} } The first part is a sphere, the second, a cube. I will get more in-depth in that section of the tutorial. Have fun, I hope that was enough info to get you experimenting. -- Samuel Benge E-Mail: STBenge@aol.com Website: http://members.aol.com/stbenge /*===================================== End of message ===================================== From: "Buckaroo Bill" Message-ID: <37fa7633@news.povray.org> ////////////////// #declare EKS = 0; #while ( EKS < 1.33 ) #declare WHY = 0; #while ( WHY < 1 ) ///////////////// isosurface { function((x^2+y^2+z^2) +(noise3d(x*(WHY*5),y*(WHY*5),z*(WHY*5))*(EKS*5)) ) threshold 1 scale < 1.0, 1.0, 1.0 > translate < EKS*20, WHY*20, 0.0 > pigment{rgb < 1.0, 1.0, 1.0 >} finish { ambient 0.5 } } ///////////////// #declare WHY = WHY + 0.1; #end//WHY #declare EKS = EKS + 0.1; #end//EKS ////////////////// [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\noise3d0011x1.jpg] end /*===================================== End of message ===================================== From: "TonyB" Message-ID: <37fa9dde@news.povray.org> Well, here it is. I don't see any need for this. It seems simple, at least it did to me after Samuel's explanation. I'll break it down for you, nonetheless. /* 05-10-1999 "BoxBlob" by Anthony Bennett Feel free to use it, all I want is credit and/or notification Notes: * blob | union & intersection % difference min(a,b) union max(a,b) intersection */ //lights! light_source {< 1,1,-1>*10 rgb <1.00,1.00,0>*2/3} light_source {< 0,1,-1>*10 rgb <1.00,0.75,0>*2/3} light_source {<-1,1,-1>*10 rgb <1.00,0.50,0>*2/3} //camera! camera {location <1,2,-3>*2.8 look_at 0} //action! //Following are the definitions for //the boxes used in the function of //the isosurface. #declare c1 = < 1,4, 1>; #declare c2 = <-1,2,-1>; #declare x1 = c1.x; #declare y1 = c1.y; #declare z1 = c1.z; #declare x2 = c2.x; #declare y2 = c2.y; #declare z2 = c2.z; #declare d1 = <1,-2,1>; #declare d2 =-<1, 4,1>; #declare u1 = d1.x; #declare v1 = d1.y; #declare w1 = d1.z; #declare u2 = d2.x; #declare v2 = d2.y; #declare w2 = d2.z; #declare e1 = <2, 1, 1>; #declare e2 = <4,-1,-1>; #declare i1 = e1.x; #declare j1 = e1.y; #declare k1 = e1.z; #declare i2 = e2.x; #declare j2 = e2.y; #declare k2 = e2.z; #declare f1 = <-2, 1, 1>; #declare f2 = <-4,-1,-1>; #declare l1 = f1.x; #declare m1 = f1.y; #declare n1 = f1.z; #declare l2 = f2.x; #declare m2 = f2.y; #declare n2 = f2.z; #declare r0 = 3; #declare r1 = 1; isosurface { function //torus, modified and shortened formula from quartic in pov-docs (x^2*(x^2+2*z^2+2*y^2) + y^2*(y^2+2*z^2-2*(r0^2+r1^2)) + z^4 + (r0^2-r^2)*(2*z^2-2*x^2+(r0^2-r^2))) * //top box ((x-x1)*(x-x2) & (z-z1)*(z-z2) & (y-y1)*(y-y2))// + (sqrt(x^2+(y-3)^2+z^2)-1)) * //bottom box ((x-u1)*(x-u2) & (z-w1)*(z-w2) & (y-v1)*(y-v2))// + (sqrt(x^2+(y+3)^2+z^2)-1)) * //side box 1 (sorry, i forget which side...) ((x-i1)*(x-i2) & (z-k1)*(z-k2) & (y-j1)*(y-j2))// + (sqrt((x-3)^2+y^2+z^2)-1)) * //side box 2 (sorry, i forget which side...) ((x-l1)*(x-l2) & (z-n1)*(z-n2) & (y-m1)*(y-m2))// + (sqrt((x+3)^2+y^2+z^2)-1)) //perhaps threshold is a bit high, it doesn't seem to affect the boxblob much threshold 100 sign 1 bounded_by {sphere {0,4.5}} //simplicity pigment {rgb 1} finish {phong 1} } /*===================================== End of message ===================================== From: Michael Andrews Message-ID: <37FB8589.D85E3C6C@reading.ac.uk> /* Isosurface blob */ #include "colors.inc" global_settings { assumed_gamma 1.0 max_trace_level 10 } background { color rgb <1/15,1/sqrt(15),1>*0.5 } // Light constants. #declare lightDir = vnormalize(<-0.5,2.1,-2>); #declare lightLen = 1.5e6; #declare lightRad = lightLen*sin(radians(0.25)); #declare lightCol = <1,.97,.95>; // Camera constants. #declare camPos = <-0.25, 0.5, -0.75>*30; #declare camLookAt = <0,0,0>; #declare camAngle = 40; camera { up <0, 1, 0> right <4/3, 0, 0> location camPos direction <0.0, 0.0, 1> angle camAngle look_at camLookAt } light_source { 0*x colour rgb lightCol translate lightDir*lightLen parallel point_at 0 media_attenuation on } #declare r0 = 3; #declare r1 = 0.5; #declare fnTor = function { "Torus", } #declare fnSph = function { "Sphere", <1> } #declare fnBox = function { sqr(max(0,(max(abs(x),max(abs(y),abs(z))))-1)) } #declare fnTorB = function { sqr(max(0,1-sqr(1+fnTor(x,y,z)))) } #declare fnSphB = function { sqr(max(0,1-sqr(1+fnSph(x,y,z)))) } #declare fnBoxB = function { sqr(max(0,1-sqr(1+fnBox(x,y,z)))) } #declare fnLongFunc = function { 0.1 - ( fnTorB(x,z,y) + fnSphB(x*2,0,z*2) + fnSphB(0,y*2,z*2) + fnBoxB(x,y+3,z) + fnBoxB(x,y-3,z) + fnBoxB(x+3,y,z) + fnBoxB(x-3,y,z) ) } isosurface { function { fnLongFunc(x,y,z) } bounded_by { box { -10, 10 } } eval sign 1 pigment { rgb <.9,.85,.7> } } /* Bye for now, Mike Andrews. */ /*===================================== End of message ===================================== From: "Greg M. Johnson" <"gregj;-)56590"@aol.c;-)om> Message-ID: <37faa9fe@news.povray.org> Hey man, why don't you just try: #declare f=.040; #declare R=399; isosurface { function {noise3d(x*f,y*f,z*f)+((x^2+y^2+z^2)/R^2) } accuracy 0.01 threshold 1 bounded_by { sphere{0,500} } pigment{Green} finish{ambient 0.1} normal {crackle} } And then sleep on the results?? "Greg M. Johnson" wrote: > SPHERE! > > "Jerome M. BERGER" wrote: > > > "Greg M. Johnson" wrote: > > > > > > noise3d (x*f, y*f, z*f)*(R-sqrt(x^2+y^2+z^2)) > > > > > > Nope. This is a solid sphere. > > > I've used R=500 and a dozen orders of magnitude for f. > > > > > > I've had a little luck with adding an "*f" term to the right side. But this > > > is not the concept, although intuitively the math must be VERY CLOSE.... > > > > > What about noise3d(...)-sqrt(...)/R ? > > > > Jerome > > > > -- > > ******************************* > > * Always listen to experts, * Jérôme M. BERGER > > * they'll tell you what can't * mailto:bergerj@iname.com > > * be done and why... * http://www.enst.fr/~jberger > > * Then do it. * > > ******************************* /*===================================== End of message ===================================== From: Michael Andrews Message-ID: <37FB850B.F1419545@reading.ac.uk> This is a multi-part message in MIME format. --------------15ED2A9995104AE8EC7CE419 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Well, here's my version after chopping up the function into smaller pieces. I hit the isosurface function parser limit several year ago with the version that couldn't parse user functions, so I had to wait a couple of years before I could try some complex landscapes! I'll put the code in p.t.s-f (and I'll just do a copy-and-paste this time after getting a couple of agrieved posts for putting up attachments) as a reply to the post there. Bye for now, Mike Andrews. TonyB wrote: > > Hello. Using the same method as before, and after having battled against the > limitations of the isosurface patch, here is the end result. Again, this is > just demonstrative, and so is relatively simple. This is a torus, with 4 > boxes, 2 at the top and bottom and 2 at either sides. I hope you like it and > see the potential for this neat multiplication stuff. > > PS: Yes, I had to forget about the cylinders to make it short enough. =( > > [Image] --------------15ED2A9995104AE8EC7CE419 Content-Type: image/jpeg; name="longfunc.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="longfunc.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\longfunc.jpg] --------------15ED2A9995104AE8EC7CE419-- /*===================================== End of message ===================================== From: parkerr@fwi.com (Ron Parker) Message-ID: <37fca8e7@news.povray.org> On Wed, 06 Oct 1999 19:28:56 -0700, SamuelT. wrote: >Way to go! I'm sitting here trying to figure out how to do it myself. My idea was >to put all the boxes like this: > >((box)|(box)|(box)|(box)) > >and then multiply the torus to it afterward. Here's one that works nicely, I think. It has a "seam" at the planes where abs(x)=abs(y) but I'm not sure if there's anything I can do about that. It's due to the maxes and mins. I'd post an image, but I don't have anything here to convert it to jpg with. #declare x1=-4; #declare x2=-2; #declare x3=-1; #declare x4=1; #declare x5=2; #declare x6=4; #declare y1=-4; #declare y2=-2; #declare y3=-1; #declare y4=1; #declare y5=2; #declare y6=4; #declare z1=-1; #declare z2=1; isosurface { function { max((z-z1)*(z-z2), min(max((y-y1)*(y-y2)*(y-y5)*(y-y6),(x-x3)*(x-x4)), max((x-x1)*(x-x2)*(x-x5)*(x-x6),(y-y3)*(y-y4)))) * (z*z + sqr(sqrt(x*x+y*y)-3)-.25)} threshold .1 bounded_by { box {-5,5}} texture { pigment {color rgb 1} finish {diffuse .5 specular .3 ambient .2 roughness .001} } } light_source { <-20,20,-20> rgb <1,.8,.8>} light_source { <20,20,-20> rgb <.8,.8,1>} camera {location <2,5,-12> look_at 0 } /*===================================== End of message ===================================== From: "SamuelT." Message-ID: <37FC0F3F.1A6F1791@aol.com> This is a multi-part message in MIME format. --------------78AA62EABE5405B4D54FEFE2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I hope I understood just what you were saying about the noise3d. If indeed I understood you correctly, you wanted a sphere that has a thick center while remaining to have a gnarly outside, right? I just blobbed together an average, but small sphere with a normal sized one that has a lot of noise3d. I also fooled around with strength ratios between the two objects. The "&(y+1)" is just a plane I intersected the object with. Code: isosurface{ function ( (x^2+y^2+z^2+noise3d(x*8,y*8,z*8)*8)* (x^2+y^2+z^2+.5/100) ) &(y+1) threshold 1 sign 1 } -- Samuel Benge E-Mail: STBenge@aol.com Website: http://members.aol.com/stbenge --------------78AA62EABE5405B4D54FEFE2 Content-Type: image/jpeg; name="iso99.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="iso99.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\iso99.jpg] --------------78AA62EABE5405B4D54FEFE2-- /*===================================== End of message ===================================== From: "Greg M. Johnson" <"gregj;-)56590"@aol.c;-)om> Message-ID: <37ffe1e5@news.povray.org> This is a multi-part message in MIME format. --------------EF160A981E8ECA5C32193E15 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit If anyone ever has a need for such a thing, here it is: isosurface { function {(noise3d(x*f,y*f,z*f)+((sqrt(x^2+y^2+z^2)/R)^1))} accuracy 0.01 threshold 1 sign 1 bounded_by { sphere{0,500} } pigment{White} } Thanks for the advice. I was hoping to shoot my pathfinder algorithm at it. The image below is a slice provided by &(-z)&(z+.02). --------------EF160A981E8ECA5C32193E15 Content-Type: image/jpeg; name="isodense.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="isodense.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\isodense.jpg] --------------EF160A981E8ECA5C32193E15-- /*===================================== End of message ===================================== From: "Buckaroo Bill" Message-ID: <38010301@news.povray.org> /// I ended up doing this #declare Frequency = 9.0; #declare Dispersion = 2.0; #declare Slice = 0.1; /// the actual thickness #declare Radius = 1.0; /// is Slice/Radius isosurface { function { (noise3d(x*Frequency,y*Frequency,z*Frequency)) +((sqrt(x^2+y^2+z^2)/Radius)^Dispersion) &abs(z/Slice) } accuracy 0.01 threshold 1.0 sign 1 bounded_by { sphere{0, 1} } pigment{rgb 1} } /*===================================== End of message ===================================== From: "Jerome M. BERGER" Message-ID: <3814A56A.40D19140@enst.fr> This is a multi-part message in MIME format. --------------EA8977CE94B534907068D215 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reinhard Rettelbach wrote: > What I did *not* achieve yet though, are objects with rotation axes > other than 4fold . So my question to all math_cracks out there is: Is > there a common way for setting up isosurface shapes with 3-, 5-, 7-, > n-fold symmetry rotation axes? > You mean something like those? :)) isosurface { //function { max(x^3-3*x*z^2-abs(sin(9*y))*0.125, x^2+z^2+y^2-abs(sin(9*y))) } function { (abs(x+0.4*y*(-x+z*sqrt(3))))^(0.3+abs(.6*y))+ (abs((-x+z*sqrt(3))/2-0.4*y*(x+z*sqrt(3))))^(0.3+abs(.6*y))+ (abs(-(x+z*sqrt(3))/2+0.8*y*x))^(0.3+abs(.6*y))- abs(sin(9*y)) } threshold 0.001 max_gradient 50000 pigment { red 1 } finish { specular 1 } scale 0.75 } -- ******************************* * Always listen to experts, * Jérôme M. BERGER * they'll tell you what can't * mailto:bergerj@iname.com * be done and why... * http://www.enst.fr/~jberger * Then do it. * ******************************* --------------EA8977CE94B534907068D215 Content-Type: image/jpeg; name="spiky1.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="spiky1.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\spiky1.jpg] --------------EA8977CE94B534907068D215 Content-Type: image/jpeg; name="spiky2.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="spiky2.jpg" [This section was removed and saved as file D:\Agent\news.povray.org\attached\images\spiky2.jpg] --------------EA8977CE94B534907068D215-- /*===================================== End of message ===================================== From: Reinhard Rettelbach Message-ID: <3825F0EE.FF28B102@t-online.de> Chris Huff wrote: > Is it an isosurface with noise3d subtracted from the y component of a > sphere equation? Or did you use a pigment for the drips? Hi Chris, you're quite on the right trace. As an example for the image shown, in particular isosurface function is as follows: isosurface{ function {x^2+(y+0.35*(abs(noise3d(3, 10*x+0.5*noise3d(5*x, 1.7*y, 3.2*z), 3)* noise3d(3, 7*z+0.5*noise3d(6.2*x, 4.3*y, 2.4*z), 3)))^3)^2+z^2-1.5} threshold..... bounded_by {box{-2, 2}} blah{} blah{} blah{} } with a wide range for playing around with the various parameters. More and more I'm dedecting what powerfull a tool "noisy" modified isosurfaces are, for controlled introduction of irregularities into regular geometrical shapes. I imagine an animation with clock_modified parameters on such shapes. If I only had a faster PC.... ;-) Happy tracing ReVerSi /*===================================== End of message ===================================== From: "Greg M. Johnson" <"gregj;-)56590"@aol.c;-)om> Message-ID: <382af1b6@news.povray.org> This is a multi-part message in MIME format. --------------94817518CA8DFA5D92537797 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit #declare fact=78;//40; #declare fnoise=18;//40; noise =8 and divide=1 is cool! #declare fdivide=5; #declare yah=20*clock; #declare funk= isosurface { function //{y/20-2*(sin(x/7)*sin(z/7))^3} // A sort of forest {y/82-2*(sin(x/fact)*sin(z/fact))^1*(500-sqrt(x^2+z^2))/500 +noise3d(1/fnoise*x,1/fnoise*y+yah,1/fnoise*z)/fdivide } accuracy 0.01 threshold 0.0 //.08 and 0.09 looked cool. bounded_by { sphere{0,500} } pigment{Green} finish{ambient 0.2} normal {crackle} } --------------94817518CA8DFA5D92537797 Content-Type: video/mpeg; name="boid3dr01.mpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="boid3dr01.mpg" [This section was removed and saved as file d:\Agent\news.povray.org\attached\anims\boid3dr01.mpg] --------------94817518CA8DFA5D92537797-- /*===================================== End of message ===================================== From: "omniVERSE" Message-ID: <382b58a7@news.povray.org> I was expecting to see soapy bubbles or beer foam oozing, this isn't exactly like that. Kind of volcanic lava looking instead. This stuff seems boiling. Is there a way to vary the amount of "noise" over an area? The hills for example being most and valleys least, as though a settling occurs. Would be doubly interesting. Bob Greg M. Johnson <"gregj;-)56590"@aol.c;-)om> wrote in message news:382af1b6@news.povray.org... > > #declare fact=78;//40; > #declare fnoise=18;//40; noise =8 and divide=1 is cool! > #declare fdivide=5; > > > #declare yah=20*clock; > > #declare funk= > isosurface { > function file://{y/20-2*(sin(x/7)*sin(z/7))^3} // A sort of > forest > {y/82-2*(sin(x/fact)*sin(z/fact))^1*(500-sqrt(x^2+z^2))/500 > +noise3d(1/fnoise*x,1/fnoise*y+yah,1/fnoise*z)/fdivide } > accuracy 0.01 > threshold 0.0 file://.08 and 0.09 looked cool. > bounded_by { > sphere{0,500} > } > pigment{Green} > finish{ambient 0.2} > normal {crackle} > } > /*===================================== End of message ===================================== From: "omniVERSE" Message-ID: <382db1b2@news.povray.org> I've had limited success using the iso_surface and pigment function of Super Patch to make a height field of a elevation map of the Earth and then differenced it away with a inner sphere, the resulting animation was so-so. I say limited only because the best topographical images I have here to do this with are lacking in full globe coverage. However, using Kens idea would work okay for this same thing and cut away the oceans very well, except use black instead. Here's the generic pov script, less changes which might be needed: #declare _C_ = .5; // clock global_settings { max_trace_level 6 } // pointlight and camera position #declare LCX = 0; #declare LCY = 1; #declare LCZ = -9; // light_source { color rgb <1.5,1.5,1.5> // } camera { location angle 22.5 look_at 0 } #declare Earth = function { pigment { image_map { gif "w_map_gt" // your image here map_type 1 } } } #declare Radius=1; #declare Spheroid = function {"sphere",} difference { isosurface { function{Spheroid(x,y,z)-(Earth(x,y,z)/9)} method 2 max_gradient 3 bounded_by {sphere {0,1.1}} texture{ pigment {rgbft<0,3,0,.33,.5>} finish {ambient 1.5 diffuse .9 phong .3 phong_size 30} } rotate -180*y rotate -_C_*360*y } sphere {0,1.075-(.075*_C_) pigment {rgbft<3,0,0,.66,.66>} finish {ambient 3}} } Bob Ken wrote in message news:382DA53C.3D5CE800@pacbell.net... > > > Jon Lockhart wrote: > > > > I was watching a news show one day and they had a view of a > > spinning globe. Each continent seemed to be created out of > > a mesh of some kind. Where oceans normally, would be, you > > could see through to the other side of globe. Each continent > > was its own object. In other words, they weren't using an > > image-mapped sphere. I've done image-mapped spheres. > > Hypothetical solution untested and untried - > > Going back to the image map idea for just a minute it might still be > possible to use this method to create the model you want. The method > I would use would be to paint the ocean basins white and leave the > land masses the original colors. Then use a filter index for the > image map that cooresponds to the white used in the ocean basins. > When sphericaly mapped to a globe you should now see just the land > masses with clear areas where the oceans once were. > > -- > Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links: > http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/ /*===================================== End of message ===================================== From: Nieminen Juha Message-ID: <3832bb23@news.povray.org> After _LOTS_ of thinking I got a really short answer: Given an aperture angle 'Angle' for the cone and a point 'p' in space, the color for that point is: -sin(Angle)*abs(p.x)+cos(Angle)*vlength() -- main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i] ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/ /*===================================== End of message ===================================== From: Nieminen Juha Message-ID: <3832bbb8@news.povray.org> (Of course if you need a value between 0 and 1 you have to clamp the value returned by that function; I don't know how isosurface functions work but I suppose that they do the clamping by themselves when calculating pigments.) -- main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i] ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/ /*===================================== End of message ===================================== From: Nieminen Juha Message-ID: <3832c29c@news.povray.org> Nieminen Juha wrote: : -sin(Angle)*abs(p.x)+cos(Angle)*vlength() Btw, if there's no vlength()-function available, this achieves the same thing: -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z) -- main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i] ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/ /*===================================== End of message ===================================== From: Nieminen Juha Message-ID: <38341bc9@news.povray.org> After _LOTS_ of thinking I got a really short answer: Given an aperture angle 'Angle' for the cone and a point 'p' in space, the color for that point is: -sin(Angle)*abs(p.x)+cos(Angle)*sqrt(p.y*p.y+p.z*p.z) -- main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i] ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/ /*===================================== End of message ===================================== From: Chris Huff Message-ID: <38331317.96986E3@compuserve.com> This might be close to what you want, they aren't exactly concentric, more like stacked: box {< -5, -5, 0>, < 5, 5, 5 > texture { pigment { function {sqrt(x^2 + z^2)-y} color_map { [0 color Black] [1 color White] } } } } /*===================================== End of message ===================================== From: Gilles Tran Message-ID: <384FD0CB.5EBA203A@inapg.inra.fr> If this can be of help (and this is from memory), if you use a simple noise3d(A*x,B*y,C*z) function (which is a very restrictive way to use it, because you can put anything in noise3d(u,v,t)) then the larger A, B and C are the smaller the "bumps" are. - noise3d(x,y,z) will give you bumps evenly spaced - noise3d(0.1*x,y,z) will give you bumps scaled by a factor 10 on the x axis Multiplying the noise3d by a value will help control how much they affect the general shape 10*noise3d(x,y,z) -> big effect 0.1*noise3d(x,y,z) -> small effect Of course "big", "small" are all relative to the other parts of the isosurface equation and may make no sense at all in many situations. The best way to test noise3d effects is to make a simple isosurface primitive (like a sphere or a box) and then add the noise3d part to it. //sphere : isosurface{ function{x*x+y*y+z*z + 0.1*noise3d(5*x,5*y,5*z) } bounded_by {sphere {0,2}} eval sign 1 threshold 1 texture{pigment{Red}} } //box isosurface{ function{abs(x)&abs(y)&abs(z) +0.1*noise3d(5*x,5*y,5*z)} bounded_by {box {-2,2}} eval sign 1 threshold 1 texture{pigment{Red}} } G. "Greg M. Johnson" wrote: > PLEEEEEEASE????????? > > Greg M. Johnson wrote: > > > The version of superpatch that I d/l had no explanation of 3dnoise. > > > > Do the instructions for this feature exist on the web? /*===================================== End of message ===================================== From: Reinhard Rettelbach Message-ID: <38502008.90A09A76@t-online.de> Gilles Tran schrieb: > ................. > The best way to test noise3d effects is to make a simple isosurface > primitive (like a sphere or a box) and then add the noise3d part to it. > //sphere : > isosurface{ > function{x*x+y*y+z*z + 0.1*noise3d(5*x,5*y,5*z) } > bounded_by {sphere {0,2}} > eval sign 1 threshold 1 > texture{pigment{Red}} > } > //box > isosurface{ > function{abs(x)&abs(y)&abs(z) +0.1*noise3d(5*x,5*y,5*z)} > bounded_by {box {-2,2}} > eval sign 1 threshold 1 > texture{pigment{Red}} > } You aren't even restricted to apply noise3d to a basic shape like sphere or box as a whole, but you also might do so to selected terms, so try something like that too: isosurface{function {x^2 +(y+0.3*noise3d(1, y/3, 1))^2 +z^2 -3} .......} nor there is any restriction on "mixing up" the noise3d parameters in a manner like that: function{noise3d(y^2+z^2, x^2+y^2, x^2+y^2)} again, play around with this stuff and enjoy the mostly strange but sometimes also useful effects, that will occur. That's the best tutorial. ReVerSi /*===================================== End of message ===================================== From: Chris Huff Message-ID: In article <3851D4A6.B814D927@aol.com>, "SamuelT." wrote: > I was wondering if it was possible to make, say, a hexagon from an > isosurface. I can't seem to figure out a good way to make anything but > cubic objects. No matter how complex an object may seem , deep down it > is within cubic guidelines. Is there any way to make objects that use > the 360 degree model, to make seven-sided and higher polygons? If not, > can it be implemented in future versions of the isosurface? Thanks in > advance. It is definitely possible. Look at the trig functions for the isosurface, you can do just about anything with them. //Makes a hexagonal prism, the angles given to the trig functions //are the angles of the sides isosurface { function { (z*sin(radians(0)) + x*cos(radians(0)) - 1) &(z*sin(radians(60)) + x*cos(radians(60)) - 1) &(z*sin(radians(120)) + x*cos(radians(120)) - 1) &(z*sin(radians(180)) + x*cos(radians(180)) - 1) &(z*sin(radians(240)) + x*cos(radians(240)) - 1) &(z*sin(radians(300)) + x*cos(radians(300)) - 1) &(abs(y) - 1) } threshold 0 clipped_by{box {<-5, -5, -15>, < 5, 5, 5>}} accuracy 0.001 texture {ComYw} } -- Chris Huff e-mail: chrishuff_99@yahoo.com Web page: http://chrishuff.dhs.org/ /*===================================== End of message ===================================== From: Chris Huff Message-ID: In article <38529FAA.9A53DEA1@aol.com>, "SamuelT." wrote: > Cool! Thanks Chris! I'll get started on this stuff soon and might post my > progress at the images section. The only drawback about this, is that the > parser might get "bored" like it has in the past when using large > functions. Well, much of the code is duplicated, you could separate it into a separate function to make it considerably shorter, something like this: //Makes one side of prism aligned in xz plane //Syntax is: PrismSide(angle, x, z) - distance #declare PrismSide = function { z*sin(radians(x)) + y*cos(radians(x)) } //Makes a hexagonal prism, the angles given //are the angles of the sides to each other isosurface { function { PrismSide(0, x, y) - 1) &PrismSide(60, x, y) - 1) &PrismSide(120, x, y) - 1) &PrismSide(180, x, y) - 1) &PrismSide(240, x, y) - 1) &PrismSide(300, x, y) - 1) &(abs(y) - 1) } threshold 0 clipped_by{box {<-5, -5, -15>, < 5, 5, 5>}} accuracy 0.001 texture {ComYw} } -- Chris Huff e-mail: chrishuff_99@yahoo.com Web page: http://chrishuff.dhs.org/ /*===================================== End of message ===================================== From: "Greg M. Johnson" <"gregj;-)56590"@aol.c;-)om> Message-ID: <38523f49@news.povray.org> I want to set up a texture map across the cross section of an object. I want "something" in the center, and absolutely nothing at the surface. (The context is that I want to use the noise3d function, but want something skinnier than my current surface: a tree trunk for the trees in my garden!) Using the following code, I can distinctly see where the surface of the "Clear" areas are. How do I fix? #declare trunk= //union{ isosurface { function {noise3d(1/fact*x,1/fact*y,1/fact*z)}//dustspecs accuracy 0.01 threshold 0.10 //.08 and 0.09 looked cool. keep 0.15 bounded_by { box{<-boun,-3,-boun>,} } //pigment{Red} texture { function {noise3d(1/fact*x,1/fact*y,1/fact*z)} texture_map { [ 0.00 pigment {Brown}] [ 0.010 pigment {Brown}] [ 0.011 pigment {Clear}] [ 0.940 pigment {Clear}] } } } /*===================================== End of message ===================================== From: Ken Message-ID: <38539FFA.BA3EF7A3@pacbell.net> Bill DeWitt wrote: > > "Ken" wrote in message > news:38535DC3.84E0397D@pacbell.net... > > > > My first attept with Isosurfaces. > > Neat! Will you post the function? Is it in fact an "onion" Texture? Thanks, yes, yes. Mind you my skills as a mathematician are pathetic at best. I may well be making it over complicated. #declare T = pi; #declare A = pi; #declare X = A*sin(T)*(1-A*2)*(1/2); #declare Y = 2*A*cos(T)*(1-A*2)*(1/2); #declare Z = (-1+A)*(2+(A*2))*cos(T)*2; #declare Onion_Cube = function { cos(5*(sqr(sqr(x)+sqr(y)+sqr(z)))) - sin(5*(sqr(sqr(X)+sqr(Y)+sqr(Z)))) } // You can come close to the original with just this function - // function { cos ( 5*( sqr ( sqr(x) + sqr(y) + sqr(z) ))) } #declare Onion_Tex = texture { pigment { onion color_map { [.2 rgb<1,0,0>] [.4 rgb<0,0,1>] [.6 rgb<0,1,0>] [.8 rgb<1,1,0>] } } } isosurface { function { Onion_Cube } threshold 0 accuracy 0.001 texture { Onion_Tex finish { ambient .35 diffuse .5 } } rotate 45*y rotate 45*-x } -- Wishing you Seasons Greetings, A Merry Christmas, and A Happy New Year ! Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links: http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/ /*===================================== End of message ===================================== From: Ken Message-ID: <3853A0B7.59A11861@pacbell.net> An isosurface function demonstration that mimics the onion pattern in POV-Ray. #declare T = pi; #declare A = pi; #declare X = A*sin(T)*(1-A*2)*(1/2); #declare Y = 2*A*cos(T)*(1-A*2)*(1/2); #declare Z = (-1+A)*(2+(A*2))*cos(T)*2; #declare Onion_Cube = function { cos(5*(sqr(sqr(x)+sqr(y)+sqr(z)))) - sin(5*(sqr(sqr(X)+sqr(Y)+sqr(Z)))) } // You can come close to the original with just this function - // function { cos ( 5*( sqr ( sqr(x) + sqr(y) + sqr(z) ))) } #declare Onion_Tex = texture { pigment { onion color_map { [.2 rgb<1,0,0>] [.4 rgb<0,0,1>] [.6 rgb<0,1,0>] [.8 rgb<1,1,0>] } } } isosurface { function { Onion_Cube } threshold 0 accuracy 0.001 texture { Onion_Tex finish { ambient .35 diffuse .5 } } rotate 45*y rotate 45*-x } -- Wishing you Seasons Greetings, A Merry Christmas, and A Happy New Year ! Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links: http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/