POV-Ray : Newsgroups : povray.general : How to generate grain boundaries ? Server Time
24 Dec 2024 07:59:01 EST (-0500)
  How to generate grain boundaries ? (Message 1 to 7 of 7)  
From: z ss ulr
Subject: How to generate grain boundaries ?
Date: 21 Jan 2015 17:35:01
Message: <web.54c02964230fb5b61c749d50@news.povray.org>
Dear friends , Please visit link below :
http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg

I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
create a code which generates a photo similar to the one above ?

any help is greatly appreciated


Post a reply to this message

From: Anthony D  Baye
Subject: Re: How to generate grain boundaries ?
Date: 21 Jan 2015 17:40:01
Message: <web.54c02a9e8a1f7f44bd92286f0@news.povray.org>
"z.ss.ulr" <z.s### [at] gmailcom> wrote:
> Dear friends , Please visit link below :
> http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
>
> I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> create a code which generates a photo similar to the one above ?
>
> any help is greatly appreciated

you might look at this thread:

http://news.povray.org/povray.general/thread/%3C43042161@news.povray.org%3E/?ttop=368284&toff=1900

what you want is probably a scaled down version of what I was trying to do.
I'll post an image in binaries.images

Regards,
A.D.B.


Post a reply to this message

From: eticre
Subject: Re: How to generate grain boundaries ?
Date: 21 Jan 2015 19:30:00
Message: <web.54c043d08a1f7f441591f79b0@news.povray.org>
"z.ss.ulr" <z.s### [at] gmailcom> wrote:
> Dear friends , Please visit link below :
> http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
>
> I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> create a code which generates a photo similar to the one above ?
>
> any help is greatly appreciated

hi

try this
posted image in povray.binary.imge

//*PMRawBegin
#version 3.7;
//*PMRawEnd

global_settings {
   adc_bailout 0.0039216
   ambient_light rgb<0, 0, 0>
   assumed_gamma 1
   noise_generator 2

   radiosity {
      recursion_limit 3
   }
}

light_source {
   <11, 10, 0>, rgb<1, 1, 1>
   parallel
}

camera {
   perspective
   location <0, 4.66, -0.4>
   sky <0, 1, 0>
   direction <0, 0, 1>
   right <1.33333, 0, 0>
   up <0, 1, 0>
   look_at <0, 0, 0>
}

#declare Fnp = function{ pigment {
   average

   pigment_map {
      [ 1 crackle
      turbulence <0.06, 0.05, 0.06>

      color_map {
         [ 0 color rgb<0, 0, 0> ]
         [ 0.01 color rgb<1, 1, 1> ]
      }
      ]
      [ 0.7 marble
      turbulence <2, 0, 0>
      omega 0.2

      color_map {
         [ 0 color rgb<1, 1, 1> ]
         [ 0.025 color rgb<1, 1, 1> ]
         [ 0.03 color rgb<0, 0, 0> ]
         [ 0.07 color rgb<0, 0, 0> ]
         [ 0.08 color rgb<1, 1, 1> ]
      }
      scale <0.025, 1, 10>
      ]
      [ 0.7 marble
      turbulence <2, 0, 0>
      omega 0.2

      color_map {
         [ 0 color rgb<1, 1, 1> ]
         [ 0.02 color rgb<1, 1, 1> ]
         [ 0.02 color rgb<0, 0, 0> ]
         [ 0.04 color rgb<0, 0, 0> ]
         [ 0.04 color rgb<1, 1, 1> ]
      }
      scale <0.4, 1, 10>
      rotate y*90
      ]
   }
}
}

isosurface {
function { y - Fnp(x,y,z).gray }
contained_by { box { <-10, 0.9, -10>, <10, 1, 10> } }
accuracy 0.01
max_gradient 1200
max_trace 1

texture {
   pigment {
      color rgbt <1, 1, 1, 0.5>
   }

   finish {
      diffuse 1
      brilliance 1
      metallic 1
      specular 0.1
      roughness 0.05

      reflection {
         rgb<0, 0, 0>, rgb<1, 1, 1>
         fresnel
         metallic 1
      }
   }

   normal {
      bumps
      0.1
      turbulence <0.2, 0.2, 0.2>
      scale 0.01
   }
}
hollow
}


Post a reply to this message

From: Le Forgeron
Subject: Re: How to generate grain boundaries ?
Date: 22 Jan 2015 13:18:02
Message: <54c13eda@news.povray.org>
Le 21/01/2015 23:34, z.ss.ulr a écrit :
> Dear friends , Please visit link below :
> http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
> 
> I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> create a code which generates a photo similar to the one above ?
> 
> any help is greatly appreciated
> 
> 
> 
> 
If you want absolute control and voronoi-cell like (which grains might
be like), have a look at

http://wiki.povray.org/content/User:Le_Forgeron#masonry

(It's not part of the official pov-ray, it's on a parallel branch), for
grain, the texture map is probably far simpler and less colorful than in
the illustration.


Post a reply to this message

From: Alain
Subject: Re: How to generate grain boundaries ?
Date: 22 Jan 2015 14:20:20
Message: <54c14d74$1@news.povray.org>

> Dear friends , Please visit link below :
> http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
>
> I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> create a code which generates a photo similar to the one above ?
>
> any help is greatly appreciated
>
>
>
>

The pattern shown in that photo is very similar to what you get using 
the crackle pattern.
The example by ectire needlessly use radiosity.
Personaly, I'd just use a regular crackle and add "scalop_wave" to get 
the rounded effect. At least, as a first test. This would make an 
isosurface requiring a much lower max_gradient value and would probably 
render much faster.


Alain


Post a reply to this message

From: z ss ulr
Subject: Re: How to generate grain boundaries ?
Date: 22 Jan 2015 18:05:00
Message: <web.54c181c68a1f7f4412b6813f0@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> "z.ss.ulr" <z.s### [at] gmailcom> wrote:
> > Dear friends , Please visit link below :
> > http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
> >
> > I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> > create a code which generates a photo similar to the one above ?
> >
> > any help is greatly appreciated
>
> you might look at this thread:
>
>
http://news.povray.org/povray.general/thread/%3C43042161@news.povray.org%3E/?ttop=368284&toff=1900
>
> what you want is probably a scaled down version of what I was trying to do.
> I'll post an image in binaries.images
>
> Regards,
> A.D.B.

Thanks a lot ,yet there are some problems I'll see if I am able to overcome, If
I had no success I'll share them with U soon.


Post a reply to this message

From: z ss ulr
Subject: Re: How to generate grain boundaries ?
Date: 22 Jan 2015 18:10:01
Message: <web.54c182838a1f7f4412b6813f0@news.povray.org>
"eticre" <eti### [at] tinit> wrote:
> "z.ss.ulr" <z.s### [at] gmailcom> wrote:
> > Dear friends , Please visit link below :
> > http://upload.wikimedia.org/wikipedia/commons/c/cd/CrystalGrain.jpg
> >
> > I am a beginner with Pov-Ray , Yet I wonder is there anyone who could help me to
> > create a code which generates a photo similar to the one above ?
> >
> > any help is greatly appreciated
>
> hi
>
> try this
> posted image in povray.binary.imge
>
> //*PMRawBegin
> #version 3.7;
> //*PMRawEnd
>
> global_settings {
>    adc_bailout 0.0039216
>    ambient_light rgb<0, 0, 0>
>    assumed_gamma 1
>    noise_generator 2
>
>    radiosity {
>       recursion_limit 3
>    }
> }
>
> light_source {
>    <11, 10, 0>, rgb<1, 1, 1>
>    parallel
> }
>
> camera {
>    perspective
>    location <0, 4.66, -0.4>
>    sky <0, 1, 0>
>    direction <0, 0, 1>
>    right <1.33333, 0, 0>
>    up <0, 1, 0>
>    look_at <0, 0, 0>
> }
>
> #declare Fnp = function{ pigment {
>    average
>
>    pigment_map {
>       [ 1 crackle
>       turbulence <0.06, 0.05, 0.06>
>
>       color_map {
>          [ 0 color rgb<0, 0, 0> ]
>          [ 0.01 color rgb<1, 1, 1> ]
>       }
>       ]
>       [ 0.7 marble
>       turbulence <2, 0, 0>
>       omega 0.2
>
>       color_map {
>          [ 0 color rgb<1, 1, 1> ]
>          [ 0.025 color rgb<1, 1, 1> ]
>          [ 0.03 color rgb<0, 0, 0> ]
>          [ 0.07 color rgb<0, 0, 0> ]
>          [ 0.08 color rgb<1, 1, 1> ]
>       }
>       scale <0.025, 1, 10>
>       ]
>       [ 0.7 marble
>       turbulence <2, 0, 0>
>       omega 0.2
>
>       color_map {
>          [ 0 color rgb<1, 1, 1> ]
>          [ 0.02 color rgb<1, 1, 1> ]
>          [ 0.02 color rgb<0, 0, 0> ]
>          [ 0.04 color rgb<0, 0, 0> ]
>          [ 0.04 color rgb<1, 1, 1> ]
>       }
>       scale <0.4, 1, 10>
>       rotate y*90
>       ]
>    }
> }
> }
>
> isosurface {
> function { y - Fnp(x,y,z).gray }
> contained_by { box { <-10, 0.9, -10>, <10, 1, 10> } }
> accuracy 0.01
> max_gradient 1200
> max_trace 1
>
> texture {
>    pigment {
>       color rgbt <1, 1, 1, 0.5>
>    }
>
>    finish {
>       diffuse 1
>       brilliance 1
>       metallic 1
>       specular 0.1
>       roughness 0.05
>
>       reflection {
>          rgb<0, 0, 0>, rgb<1, 1, 1>
>          fresnel
>          metallic 1
>       }
>    }
>
>    normal {
>       bumps
>       0.1
>       turbulence <0.2, 0.2, 0.2>
>       scale 0.01
>    }
> }
> hollow
> }

Thanks A LOT :-)


Post a reply to this message

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