Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Challenge: 4,5 days for a 400x300 picture !
#75
The mistake was to probe cubes, thus leading to 960000 polygons for the 4th rank.

The right method, I hope, is to probe a shape composed of, if we take the example of rank 1:

1) One side of the main cube (let's call it "A"), i.e. 8 possible sub-squares, the 9th corresponding to the hole in the middle
2) The 20 inside squares that can be visibe inside the "tunnels" if the ray crosses the reference square in the hole.

Then the probing will tell which sub-square, let's call it "B", is hit by the ray. The process is iterated with this new square, which has n its turn 28 sub-squares.

So, instead of probing 960000 squares per pixel, the program will probe only 6 main cube sides (to init the recursive loop)+ 4*28 sub-sides (4th rank example) = 118 cubes !

Consequences:
1) The prog will be much faster, at least by 6000 or 7000 times
2) I can re-include the reflection and shadow raycasting
3) I can increase the size of the pic
4) I can set a much larger maximum rank

So I should, when it's done, be able to have a better pic than Paul Bourke's, which is a black&white picture without texture: and this future picture will be done with QB :bounce:
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply


Messages In This Thread
Serviteur... - by Jark - 10-27-2003, 11:01 PM
Selecting the cubes... - by Jark - 10-28-2003, 12:10 PM
I found the Tuto - by Jark - 10-28-2003, 04:39 PM
Holes... - by Jark - 10-28-2003, 09:08 PM
The Init.Apollo - by Jark - 10-28-2003, 09:13 PM
Paul Bourke's page - by Jark - 10-29-2003, 11:59 AM
Holes - by Jark - 10-29-2003, 01:27 PM
Lol... - by Jark - 10-29-2003, 01:58 PM
I started - by Jark - 10-29-2003, 02:30 PM
Holes raytracing ahead - by Jark - 10-29-2003, 04:45 PM
Raytracing holes... - by Jark - 10-29-2003, 06:14 PM
Lol... - by Jark - 10-29-2003, 07:10 PM
Picture in progress - by Jark - 10-29-2003, 09:01 PM
Another approach - by Jark - 10-30-2003, 12:29 PM
I will keep the holes... - by Jark - 10-30-2003, 04:44 PM
C++ - by Jark - 10-30-2003, 08:56 PM
50 hours for a picture - by Jark - 10-30-2003, 10:13 PM
Re: C++ - by Mango - 10-31-2003, 01:35 AM
Halloween weather - by Jark - 10-31-2003, 12:28 PM
What about Java, so ? - by Jark - 10-31-2003, 06:13 PM
My father always says... - by Jark - 10-31-2003, 07:46 PM
Script languages ? - by Jark - 10-31-2003, 10:06 PM
The saga is on... - by Jark - 11-03-2003, 05:50 PM
Neo: D/L the sources... - by Jark - 11-03-2003, 07:35 PM
The last lines... - by Jark - 11-03-2003, 10:33 PM
Re: The last lines... - by TheBigBasicQ - 11-03-2003, 10:36 PM
Lunch break... - by Jark - 11-03-2003, 10:51 PM
Yep... - by Jark - 11-04-2003, 01:10 AM
The pic ! - by Jark - 11-04-2003, 01:53 PM
I see... - by Jark - 11-04-2003, 10:56 PM
I was not sleeping... - by Jark - 11-06-2003, 01:07 AM
Great! - by Jark - 11-06-2003, 10:50 AM
I think I have the correct solution ! - by Jark - 11-08-2003, 01:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)