Logo by Fiery - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 26, 2024, 04:28:19 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: "Slicing" the 3D surface  (Read 8788 times)
0 Members and 2 Guests are viewing this topic.
Softology
Conqueror
*******
Posts: 120


« on: July 23, 2011, 11:15:44 AM »

Hello all.  I need some help with implementing slicing the bulbs.  ie you cut a 3D bulb on the X axis and it shows the cross-section of the 2D brot.

What part of the code needs changing to do this?  I have tried all sorts of things, but cannot get it working.  Any tips highly appreciated.

Thanks,
Jason.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: July 23, 2011, 01:44:53 PM »

you just return in your calculation loop

if x>0 return outside ( e.g. maxIter)

that should be it ... if you use a generalized normal calculation ( by shooting 3 rays ) you should get a clean surface....

havent done it myself, but can not see why it should be other ..... correct me if i am wrong ...
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #2 on: July 24, 2011, 12:25:18 AM »

Or just calculate the distance to the plane for the current viewvector, step forward that amount, raystep.
If you already inside, the normal is just that from the cutplane, dependend on which side you are.
Logged
Softology
Conqueror
*******
Posts: 120


« Reply #3 on: July 25, 2011, 01:54:26 AM »

Or just calculate the distance to the plane for the current viewvector, step forward that amount, raystep.
If you already inside, the normal is just that from the cutplane, dependend on which side you are.

Any chance could you share a snippet of code for finding the distance to the cutplane(s)?  I have both rayorigin and raydirection as normailized 3D vectors.  I looked around for ray plane intersection info and only got confused.

Thanks,
Jason.



Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.124 seconds with 26 queries. (Pretty URLs adds 0.008s, 2q)