POV-Ray : Newsgroups : povray.general : Lightning Server Time
6 Aug 2024 19:28:02 EDT (-0400)
  Lightning (Message 1 to 7 of 7)  
From: Timothy R  Cook
Subject: Lightning
Date: 22 Feb 2002 22:18:05
Message: <3C7709EC.1D49E3CC@scifi-fantasy.com>
How make?

-- 
Tim Cook
http://empyrean.scifi-fantasy.com

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Ken
Subject: Re: Lightning
Date: 22 Feb 2002 22:43:48
Message: <3C770FFB.D1B7063C@pacbell.net>
"Timothy R. Cook" wrote:
> 
> How make?

This how - http://www.geocities.com/SiliconValley/Pines/3210/lightnin.html

-- 
Ken Tyler


Post a reply to this message

From: Jon Berndt
Subject: Re: Lightning
Date: 22 Feb 2002 23:09:58
Message: <3c771616$1@news.povray.org>
> Timothy Cook wrote:
> >
> > How make?

Ken wrote:

> This how - http://www.geocities.com/SiliconValley/Pines/3210/lightnin.html

I knew there was a contest for shortest code, but ...


:-)    i laughed audibly in your general direction


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Lightning
Date: 22 Feb 2002 23:18:56
Message: <3C771830.87CA1FA@scifi-fantasy.com>
Ken wrote:
> This how - http://www.geocities.com/SiliconValley/Pines/3210/lightnin.html

There plugin for Moray for lightning.inc?
-- 
Tim Cook
http://empyrean.scifi-fantasy.com

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Ken
Subject: Re: Lightning
Date: 22 Feb 2002 23:22:23
Message: <3C771907.7EE438DA@pacbell.net>
"Timothy R. Cook" wrote:

> There plugin for Moray for lightning.inc?

Not know.

-- 
Ken Tyler


Post a reply to this message

From: Nekar Xenos
Subject: Re: Lightning
Date: 23 Feb 2002 02:43:13
Message: <3c774811@news.povray.org>
"Timothy R. Cook" <tim### [at] scifi-fantasycom> wrote in message
news:3C7709EC.1D49E3CC@scifi-fantasy.com...
> How make?

Sumtieng luk dis?

--
#local X=20*<-2,2,5>;#local K=2*z*X-X;#local R=seed(frame_number);blob{#while(K
.x>X.x)#local N=X+<rand(R)rand(R)1>/3;#local X=(vlength(N-K)<vlength(X-K)?N:2*X
-N);sphere{X,1,1rotate z*90}sphere{X,1,1}#end pigment{rgbt 1}interior{media{
emission<2,4,5>*5}}hollow scale.05}//   http://nekar_xenos.tripod.com/metanoia/
sphere_sweep{catmull_rom_spline 6<-8,-8>1<-8,-8>1<-8,8>1<8,-8>1<8,8>1<8,8>1
translate 20*z pigment{gradient z scale 3color_map{[0rgb<0,9,18>][1rgb 0]}}}


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2002/02/19


Post a reply to this message

From: Tom Melly
Subject: Re: Lightning
Date: 25 Feb 2002 05:17:02
Message: <3c7a0f1e$1@news.povray.org>
"Timothy R. Cook" <tim### [at] scifi-fantasycom> wrote in message
news:3C7709EC.1D49E3CC@scifi-fantasy.com...
> How make?

There was some code for this in images a few months ago (one code example was
mine).

Hang on... (this is for megapov, but I think it will work with 3.5 - also you
could speed it up by changing the merge to a union)

#macro Make_Bolt(LArraySize, LSeed, LWidth, LHeight, LSpread, LBranch,
LCutoff, LSpike)
  #declare myArray = array[LArraySize]
  #declare checkCount = -1;
  #declare highCount = 0;
  #declare arrayCount = 0;
  #declare myArray[arrayCount] = <0,0,0>;
  #declare myRand = seed(LSeed);
  #declare Lightning_Bolt =
    merge{
    #while (checkCount < highCount)
      #declare checkCount = checkCount + 1;
      #declare segPosA = myArray[arrayCount];
      #declare arrayCount = arrayCount + 1;
      #declare xPlus = (rand(myRand)-0.5)*LSpread;
      #declare zPlus = (rand(myRand)-0.5)*LSpread;
      #while(segPosA.y < LHeight)
        #declare xShift = segPosA.x + ((rand(myRand)-0.5)*LSpike) + xPlus;
        #declare yShift = segPosA.y + (rand(myRand)/5);
        #declare zShift = segPosA.z + ((rand(myRand)-0.5)*LSpike) + zPlus;
        #if (yShift > LHeight)
          #declare yShift = LHeight;
        #end
        #declare segPosB = <xShift, yShift, zShift>;
        cylinder{segPosA, segPosB, LWidth}
        #declare segPosA = segPosB;
        #declare randNum = rand(myRand);
        #if (randNum < LBranch & segPosA.y > LCutoff)
          #declare highCount = highCount + 1;
          #declare myArray[highCount] = segPosA;
        #end
        #declare LWidth = (LWidth*0.995)   ;
      #end
      #declare LWidth = (LWidth*0.9)   ;
    #end
  }
#end

Make_Bolt(500, 11211, 0.03, 6, 0.003, 0.05, 0.5, 0.2)
object{
  Lightning_Bolt
  pigment{rgbt 1}
  interior{media{emission<3,3,5>*5}}
  hollow
  rotate x*180
  no_shadow
  translate y*5
}


Post a reply to this message

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