Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

ive built a small little program, that you have to edit the source to change parameters of, but either way im pretty proud of it

the program uses a distance estimator to ray trace a rotated quaternion julia set using unbounding spheres to iteratively approach the intersection point, at which point it approximates a surface normal using gradients with surrounding intersection points. and then casts another ray to intersect the quaternion julia set towards each of the 4 point light sources. if a secondary ray intersects julia set again, that light will not be added to the pixels lighting, thereby adding self shadowing to the quaternion julia set.

here are 4 images i made from screenshots of renderings.

the program also records the number of intersections that are attempted to be calculated, and the number of surface normals calculated

for these 4, it ranged from round about 500 000 intersections to 800 000 intersections, and 70 000 to 100 000 surface normal calculations.

each one took between 8 and 12 seconds to render on a 512x512 screen.

*Last edited by luca-deltodesco (2006-10-14 22:31:13)*

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**ganesh****Administrator**- Registered: 2005-06-28
- Posts: 26,405

luca-deltodesco,

I couldn't follow much of what you have written.

However, the images are brilliant!

Indeed, you can take pride in what you have done!

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**Devantè****Real Member**- Registered: 2006-07-14
- Posts: 6,400

Cool stuff, luca-deltodesco. The images have a very nice effect.

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

Ive now advanced a bit further.

the whole scene is now contained within a large sphere with a procedural checkerboard texture and both the sphere and quaternion julia set are reflective, although the julia set noticabley alot more.

These took about an extra 6 seconds to render, with more than 1,000,000 more rays being cast, and intersections calculated

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,686

That is insanely good, luca!

If I understand correctly, it is like a 3D version of the familiar quadratic Julia Set that I have an example of in the header of the "Advanced" pages (for example Power Set).

Put simply, you have a function that you call repeatedly (iterate), and in some places it settles down to a value, but in others it goes wild, and you are plotting that as a boundary - a solid Julia Set!

And the common Julia set uses complex numbers, but you use quaternion numbers (which are like complex numbers but with more terms).

I think you should have all of this on a website (this one if you want). Write it up as an investigation, and it could be a great read, particularly with the beautiful images.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

its actually a 4d version, and you take a 3dimensional slice of it from 4d space.

im not quite sure what you mean by an investigation of it, please explain?

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,686

Like a diary of your work. A story. Or maybe something like travel-writers do.

Start off with your preparations (travel maps, hiking gear, etc) then show the trip in words and pictures.

Opening paragraph:

"Having developed my ray tracing program to the point where it was producing reasonable reults, I decided I would like to tackle a subject that had fascinated me: the Julia Set. But not the common Julia Set, I wanted to do the Quaternion Julia Set. But perhaps I better take a step back here and explain what a Julia Set is."

(quick precis of Julia Set)

(quick explanation of Quaternion)

"So, how does this translate to the world of computers? I decided to find out ..."

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

these were actually rendered in a specific program designed solely for ray tracing a quaternion julia set, and then i added a sphere in. I have restarted on my ray tracing stuff though. And rather than like before. Im making it more of a ray tracing graphics library. with a minimalistic amount of code for setting up a win32 window, and a little bit of openGL to display a texture to the screen. you can start ray tracing stuff.

The way im making it is very good, because already ive hardly started, and i can just use it as it is, and constantly add more primitaves into, ive just added normal mapping for the current primitaves (being planes and spheres)

it now has, sphere and planes, that can have a bitmap texture, or a procedural solid colour texture, or checkerboard texture.

the spheres and planes can be scaled rotated in any fashion, and a normal map applied. the texture and normal maps can all be translated, rotated and scaled however you like.

There is also optional anti-aliasing, the last two images are rendered with 4x anti aliasing through super sampling.

*Last edited by luca-deltodesco (2006-10-16 18:13:11)*

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

**ganesh****Administrator**- Registered: 2005-06-28
- Posts: 26,405

Very very good, indeed!

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi.

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,686

That is a real talent. The images are looking really good.

As you probably know, I sometimes use Povray, but find it really time consuming getting the object, viewpoint and lights positioned correctly. I have tried other programs that have better "positioning" tools, but they don't render as nicely. Still an evolving field.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**luca-deltodesco****Member**- Registered: 2006-05-05
- Posts: 1,470

Ive now added discs, with two styles of texturing for both texture maps, and normal maps. One DRT_DISC_FLAT, map coordinates are just from cartesian coordinates in the discs coordinate space. DRT_DISC_ROUND, means that its the polar coordinates that define the map coordinates.

Ive also now added proper lighting with point lights (defined by position and colour and strength) strength of the light decreases over space, im going to make it so you can control how fast it disintegrates later. You can especialy see the effect the normal mapping on left disc has with the lights, it makes a rather nice looking effect

both discs are using the same normal map, and the same texture map.

*Last edited by luca-deltodesco (2006-10-17 18:30:23)*

The Beginning Of All Things To End.

The End Of All Things To Come.

Offline

Pages: **1**