Author Topic: Beam helixes  (Read 5500 times)

0 Members and 1 Guest are viewing this topic.

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
isnt there an easier way to do this? like have the beam map tiled and translate in the direction in which the beam is 'shot'?  Then all you have to do to get different effects is change the map; which would look smoother anyways.  Some upsides is that it could be useful for other kinds of beam stuff as well ;)

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
That's what I was saying for the sine and cosine waves, Lt. Narol.  The helices (no, that's not a typo) can't work the same way, because they have to be 3D to look right.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
this could be very cool, and the code could be used to improve other things like the damage archs
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Anaz

  • 210
My friend and I worked out some stuff for the z position of the beam:

z = sin(x) + sqrt(-(y * y));

Hope that helps!
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Quote
Originally posted by Analazon
z = sin(x) + sqrt(-(y * y));


I didn't know fs2_open could handle imaginary numbers. :wtf: ;)

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Quote
Originally posted by Analazon
My friend and I worked out some stuff for the z position of the beam:

z = sin(x) + sqrt(-(y * y));

Hope that helps!


Nah!  Try using vector graphs.

r(t)=2cos(t)i+2sin(t)j+tk

Vectors rule!

 

Offline Anaz

  • 210
Quote
Originally posted by Rampage


Nah!  Try using vector graphs.

r(t)=2cos(t)i+2sin(t)j+tk

Vectors rule!


meh....I'm not familiar with how DirectX works...and this was a 30 second thing. I think the - needs to be moved outside of the sqrt() in what I wrote...
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
That would make more sense.  In your first formula, you were taking the square root of a negative number. :)