Jump to content


- - - - -

Storm lightning...


3 replies to this topic

#1 jmgk

    New Member

  • Members
  • Pip
  • 5 posts

Posted 27 May 2006 - 05:09 AM

Hi,

I coded a very simple particle engine, and did a usual fireworks demo using it.

Now, i want to use this lil engine to draw a stormy night... i already using it to make the rainfall, but i dont know how to make the storm lightnings?

Anybody know the formula to create realistic lightnings?

If somebody still remember it, I want to do lightnings like the ones that where in old AfterDark screensavers for w31

Any help is welcome,
jmgk

ps: to the ones that dont know AfterDark, i want to do something like these ones: http://www.chaseday.com/lightning.htm

#2 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 697 posts

Posted 27 May 2006 - 09:29 AM

You can make a kind of tree. Something like this might work: you start with a point, up in the sky, and you draw lines between points. You have several probabilities: p0, for terminating the the line segment; p1, for creating a branch and p2 for direction changes. Use your imagination for more details (like varying the probabilities with respect to the age/length/strength/thickness of the line segment). Next, you triangulate the lightning-tree and draw it, and use blooming to make it look cooler :)

#3 Mark

    New Member

  • Members
  • PipPip
  • 29 posts

Posted 27 May 2006 - 11:29 AM

You should read up on how lightning works;

http://www.howstuffw...m/lightning.htm

Apply what you find toward creating your own model based on the physics involved. This could be a really interesting project. Good luck.

#4 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 27 May 2006 - 08:26 PM

I believe lightning strikes are fractals.
A quick google search turned up this: http://www.krazydad...._lightning.html
They use a midpoint displacement method.
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users