PDA

View Full Version : 3D curves texturing between mathematica and thinbasic



zak
19-10-2010, 16:37
Wolfram Research is partnering with NVIDIA to integrate GPU programming into Mathematica.
this is the latest news from wolfram mathematica:
http://blog.wolfram.com/2010/09/14/mathematica-and-nvidia-in-action-see-your-gpu-in-a-whole-different-light/
also look at the video link in that page.
look also the article:
http://blog.wolfram.com/2010/09/20/tapping-into-the-power-of-gpu-in-mathematica/

it planned to utilize nvidia cards in the mathematica in the next version 8
in the article "Twisted Pictures":
http://blog.wolfram.com/2010/09/01/twisted-pictures/
the author was playing in an experimetal v8, he show that the new version enable the user to texture a 3d curve like this:

http://blog.wolfram.com/data/uploads/2010/08/TwistedBM1.png
to produce the result as in the above article.

i remembered the Petr example waterpatch in "Height of ground, how to get this":
http://www.thinbasic.com/community/showthread.php?8150-Height-of-ground-how-to-get-this
and the more advanced:
http://community.thinbasic.com/index.php?topic=3671.msg27012#msg27012

it is possible to texture a curve in thinbasic: here is the same Petr example, i just replaced the original 3d curve by a 3d ripple curve , it should produce this image:
7738

you can find more 3d curves from here:
http://www.benjoffe.com/code/tools/functions3d/examples
also test your curves here:
http://www.benjoffe.com/code/tools/functions3d/
and since the model x and z go from -3 to 3 and our example go from -1 to 1 so we have passed x,z to returnY as returnY(x/3,z/3), correct me Petr if i am wrong, i have some ambiguity here.

other interesting curve is what produced A letter, just uncomment the suitable line to make it appear like this:
7739

attached the same Petr example with the new equations.
if you don't want the animation just delete gFrameTime/600

PS: added with_tiger_skin other example, you will feel as if the skin of the tiger almost about to tear. if you want one piece of skin convert it like the other examples.

Petr Schreiber
19-10-2010, 17:55
Hi Zak,

thanks a lot for sharing, it looks very good! I like it very much, the A letter is great :)

With thinBasic it would be also possible to perform the computation on GPU, as I translated the OpenCL headers.
The problem is that this approach needs new card and even newer drivers :)


Petr