Logo by KRAFTWERK - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. April 26, 2024, 12:03:31 PM


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 2 [3]   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: Calculating normals  (Read 13534 times)
0 Members and 1 Guest are viewing this topic.
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #30 on: November 24, 2009, 12:39:13 AM »


One disatwantage is when central point is on the edge of the object, then one of additional points can miss the fractal and you raytrace till hit the bounding sphere or other far part of the object.


I now just assume the DE values from the 4 adjacent points are correct and don't do any extra ray-tracing at all, this doesn't seem to cause any issues.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Snakehand
Guest
« Reply #31 on: December 11, 2009, 11:28:11 AM »

I have implemented my own GPU renderer from scratch, and use a "quaternion fitting" to find normals.

Here is an image rendered with flat ambient + diffuse and specular from a single point light source.



The fitting picks a random (fixed) incidental vector to the point, and searches for a rotation around this axis that brings a small perpendicular displacement flush with the boundary. The process is then repeat using the vector that has been found to be flush with the surface, and the dot product of the two flush vector gives the normal.

« Last Edit: December 11, 2009, 01:11:22 PM by Snakehand, Reason: Wrong image. » Logged
Pages: 1 2 [3]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Calculating surface normals for 3D fractals Programming Derakon 0 2690 Last post November 28, 2009, 04:20:30 AM
by Derakon
Calculating the period of a mandelbrot bulb Help & Support aluminumstudios 6 1462 Last post February 19, 2010, 04:18:30 PM
by lkmitch
Align to normals... what I'm doing wrong? Help & Support « 1 2 » Kali 16 726 Last post December 19, 2012, 06:52:50 PM
by eiffie
calculating new reference points using information from glitch detection Mandelbrot & Julia Set claude 0 2771 Last post July 31, 2015, 02:57:00 AM
by claude
Calculating sound using fractal algorithms, what's out there ? Fractal Music djbarney 12 6007 Last post June 10, 2016, 11:03:44 AM
by djbarney

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.226 seconds with 26 queries. (Pretty URLs adds 0.01s, 2q)