Grasshopper

algorithmic modeling for Rhino

Hi!

i have 2 waves generated in GH, and i would like them to interfere, (like it's shown in the second picture).
This means that the altitude of a point on the interference surface is determined by the sum of the z-coordinates of the 2 initial wave surfaces in that XY plane coordinate.

how do you advise me to go about this?

one way is to make a horizontal grid of vertical lines that intersect the two initial wave surfaces, get the intersection points and generate a new point in the middle of the distance between the initial two. then make a new surface based on the newly generated points.

is there a simpler/more economical way of doing this?

thank you!
andrei

http://img37.imageshack.us/img37/2140/interfy.jpg
http://img199.imageshack.us/img199/8712/wavesculoare3d.jpg

(how ca i embed pictures in the post? it seems it doesn't work as in the usual forums, if i use the [URL .... URL] thingies, it just displays the text, not the image..)

Views: 13562

Replies to This Discussion

Hi Andrei,

Wave interference is not wave-averaging, it's wave summation. You have to add one wave on top of the other to get interference. Your basic approach is correct though, you should evaluate the elevation of all base waves for a set of points (rectangular grid makes the most sense), then add the z-components together and make a new surface:


--
David Rutten
david@mcneel.com
Poprad, Slovakia
wow, thanks, that's spot-on! great!
(and yes, i made a mistake about thinking to average the waves)
may i ask how you generated the initial waves as well? i do have the definition for that already, but i have a hunch it can be done in an easier way than i went about it (i generated circles for the crests and the valleys, and then lofted them)
I made the initial waves by hand. Just draw a wavy nurbs curve and revolve it through 360 degrees.

If you have actual equations that define the initial waves, chances are the solve will be much faster. Ray-Surface intersections are very expensive operations, so if you can cut that bit out of the process, it will probably become real-time.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Also, to generate the whole thing mathematically you could use a function like this:

sin(((x-a)^2+(y-b)^2)^.5)

where (a,b) is the location of the waves' centre.
Attachments:

Hey Daniel that looks stunning, could anyone tell me how to to make it into the animation like that?? thanks a lot!!do we need to add a slider in its definition ?
hey, sorry, i just realized i didn't answer you, sorry. thanks for the def! i used it and tweaked it, implemented wave attenuation and other stuff i needed. thanks for your support! (i like the animation as well)

Hi Daniel,

 

would you mind sending me the definition of this interference? for some reason, I couldn't download the file attached here. Thanks a million! Please send email to yang_z02@hotmail.com. Thanks again.

could anyone tell me how to make this into animation thanks a lot
i think it's animate slider from the context menu

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service