Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimisation : from 65 hours down to 65 seconds!
#31
Quote:Jark, I'm having a hard time understanding this:

Code:
1. Scan the main cube
2. Get the entry side in the plain cube
3. Scan the 28 squares shape that corresponds to this entry side
4. Get the sub-square position and orientation
5. Iterate until the holes get too small for the pixels

I'm really confused. What if the polygon iteration calls for a big displacement that will not cover the entire area of the previous iteration?

In case the ray crosses a shape (through the main tunnel), the shape is moved by one unit until a polygon is hit. In case the shape gets out of the main cube, then it means you are really viewing through the cube, and there is no hit (Flagplot%=0). Read the module called Probe.Ray to see what I mean :wink:
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
#32
Was talking to antoni, i guess i should have been more clear Smile
oship me and i will give you lots of guurrls and beeea
#33
Blitz: Please do it! I'm becoming lazier every year and I will probably never switch to C. But I offer you all the help on decyphering my code. The latest source is at my site

The latest QB source is at my site.
http://www.geocities.com/antonigual/qbso...pegv41.zip

You may have some problems in porting it as it 's full of tweaks
and it's not designed as a module (the svga calls are embedded).
Antoni
#34
omg, i take it back. I forgot your coding style is too l33t for me. heehe. Damnit, it will take me a wekk just ot figure out what's what. But i'll do it.
oship me and i will give you lots of guurrls and beeea
#35
nevarr!! I just saw all the gosubs. And all the comments.
oship me and i will give you lots of guurrls and beeea
#36
l33t? Better say messy...
Antoni
#37
I have to admit that when I tried to get into your Jpeg viewer (a while ago!), my reaction was something like "this guy was crazy enough to translate the Jpeg spec into basic!". I don't think another Qb progger would do that again: let's all try to think sincerely and thoroughly about what happened around this, there's a bunch of questions about progging and new technologies behind this tree (thinking about a french expression that says "the tree that conceals a forest").

As for gosub's, well they are great sometimes, and avoid the sometimes heavy sub (with their black-box, systemic conception - not to say object oriented). There are times when they MUST be used: inside a regular subroutine, I mean.

Last philosophical item: I have bought Science&Vie #1034, Antoni...

Well, the first approach I used for the spong was closer to the constructals, the second was a genuine fractal logics. But I miss one important thing in my progging: the optimal logics ! :rotfl:

One thing I wanna develop on the Dazibao: think about life being moving along a geodesic in the five aggregates buddhist concepts. Then optimisation, in the meaning followed by Adrian Bejan, becomes the obvious, only solution... Kind of a "extended Riemann geometry" :???: :-? :o
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
#38
:o ok, WOW. Sorry to be a little late in the game here, but I havent been to QBN forums for a few days. That is a quite extraordinary speed increase.

Once I had a program that I made, It was some silly program for outputing every possible anagram of a word that I could input. The speed was shockingly slow, until one day I decided to redesign the engine behind it. Pow, I had an instant 99.9% speed increase! The feeling of optimising an idea that youve already had is brilliant if the increase in speed is that great.

Well done Jark! You are the :king: King :king: of raytracing in QB!!
#39
Jark:
In fact I was not the first one who programmed a Jpeg viewer in QB.
The first one was Petter Holmberg
http://ec.neozones.com/
and then came Dmitri Brant http://www.dmitrybrant.com/modules.php?n...load&cid=6
I just did the fastest one. Then someone (not me) uploaded it to qb45.com and it became a hit.

And excuse this question from an agnosthic but where in the Buddha's teachings are the geodesics? Big Grin
Antoni
#40
I'm just kidding with you, but it would take to long to get the whole picture of your code because of the gosubs/gotos and few comments. I don't have that much time. That's why they say never to use gosub/goto.
oship me and i will give you lots of guurrls and beeea


Forum Jump:


Users browsing this thread: 1 Guest(s)