programing a raytracer

Discuss stuff not about Indigo.
IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sun May 06, 2007 12:22 am

OnoSendai wrote:Oh no, not the Java/C++ speed discussion :)
LOL, yeh ... I rarely get involved in such discussions but when someone makes sweeping statements (that are false) and fails to back them up then I'm forced to bite :wink:
Deus wrote:wrote my first floating point library and on top of that a raytracer in assembly when you were still in your diapers. (about 15 years ago)
Well, it's been stated on this forum before ... I wrote mine about 21 years ago, first in BASIC and then 6502A assembly language on a venerable old BBC Micro Model B. Then at Uni on a Sun workstation (in C), then on HP-UX in C++ then on PCs in C++ then Java etc. etc.

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 12:26 am

I never wrote one.
15 years ago, I was 2 years old, 21 years ago...
uhm... what was I, then?
( :idea: Philosophic question allert :idea: ) [those bulbs should emit red, atm]

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Sun May 06, 2007 12:34 am

Kram1032 wrote:I never wrote one.
15 years ago, I was 2 years old, 21 years ago...
uhm... what was I, then?
( :idea: Philosophic question allert :idea: ) [those bulbs should emit red, atm]
15 years ago I was 21. And I'd written loads of crappy BASIC programs :D
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sun May 06, 2007 12:56 am

Kram1032 wrote:I never wrote one.
15 years ago, I was 2 years old, 21 years ago...
uhm... what was I, then?
( :idea: Philosophic question allert :idea: ) [those bulbs should emit red, atm]
Hmmm ... 21 years ago the twinkle in your father's eye was just a spark?

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 1:07 am

uhm...
which twinkle? :lol:

User avatar
eman7613
Posts: 597
Joined: Sat Sep 16, 2006 2:52 pm

Post by eman7613 » Sun May 06, 2007 3:56 am

15 years ago i was also two ;p

oh, and im gona go out on a limb and say FORTAN > GOD :twisted: :twisted: :twisted: :twisted: :twisted: :lol:

Perhaps wer should do speed tests with asp and php derived ray tracers >.>
Yes i know, my spelling sucks

User avatar
oodmb
Posts: 271
Joined: Thu Oct 26, 2006 5:39 am
Location: USA
Contact:

Post by oodmb » Sun May 06, 2007 4:21 am

the source is sent. good luck getting it to compile, if you cant, just try downloading jbuilder, its probably the most awesome java ide anyway.

btw, how'd all you people get access to computers and learn how to program them so long ago?
a shiny monkey is a happy monkey

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sun May 06, 2007 4:32 am

oodmb wrote:the source is sent. good luck getting it to compile, if you cant, just try downloading jbuilder, its probably the most awesome java ide anyway.

btw, how'd all you people get access to computers and learn how to program them so long ago?
Thanks, I looked at it briefly and can't see much wrong with the triange intersection stuff (certainly nothing obvious leaps out that suggests why swapping the vertices would cause the whole thing to go wrong :? )

Re: computers...

I think I was 12 (1982) when the home computer revolution started with the Sinclair ZX81 (3.25Mhz Z80, 1K RAM expandable to 16/48, monochrome UHF display) and I wrote a "Hello World" program pretty soon after that. Then I got a Sinclair ZX Spectrum for Xmas when I was 13 but it blew up twice (nearly caught fire once) so my parents got me a BBC Micro Model B (2Mhz 6502, 32K RAM, 16 colour display) which was far more reliable. I wrote my first ray tracer in BBC BASIC when I was about 15 and speeded it up significantly by writing a floating point library (well, actually it was 5 byte fixed point) and then the ray tracer on top of it (also in assembler). It supported specular reflection, refraction, diffuse spheres over a red/white checkerboard ground. I managed to simulate 16M colours by flashing up composite images and then recording them with an open-shutter camera. Even managed to make a nice animation of a mirrored-ball bouncing up and down :)

It was an overnight job to render a single frame at 160x256. Those were the days...

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 4:45 am

started with the Sinclair ZX81 (3.25Mhz Z80, 1K RAM expandable to 16/48, monochrome UHF display)
a BBC Micro Model B (2Mhz 6502, 32K RAM, 16 colour display)
ok... your first PC had 2 colours, 3.25Mhz and 1kB RAM.
your 3rd had 16 colours, 2 Mhz and 32kB RAM...

So, your first PC was faster in rendering, than your 3rd, but it wasn't able to show the colours and lacked in RAM... hmmm...

Would it have been able, to take the processor from the first PC to the 3rd, or was there a different improvement, or what? :?

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sun May 06, 2007 4:53 am

Kram1032 wrote:
started with the Sinclair ZX81 (3.25Mhz Z80, 1K RAM expandable to 16/48, monochrome UHF display)
a BBC Micro Model B (2Mhz 6502, 32K RAM, 16 colour display)
ok... your first PC had 2 colours, 3.25Mhz and 1kB RAM.
your 3rd had 16 colours, 2 Mhz and 32kB RAM...

So, your first PC was faster in rendering, than your 3rd, but it wasn't able to show the colours and lacked in RAM... hmmm...

Would it have been able, to take the processor from the first PC to the 3rd, or was there a different improvement, or what? :?
Actually, the 6502A at 2Mhz could out-perform the Z80 at 3.25Mhz, mainly because its architecture was pseudo-RISC (reduced instruction set) and the Z80 was CISC (complex...). This meant that most instruction decoding was hardwired, unlike the Z80 that relied on tons of microcode ... the former could do many operations in 1 or 2 clock cycles, the latter needed a lot more on average.

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 4:55 am

I see....

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Sun May 06, 2007 8:48 pm

Just like to clarify to the IanC who's a year older than me, so obviously losing his memory and going senile ;), that the home computer revolution began with the ZX81 in 1981 and even before that with the ZX80 in 1980. The ZX82, to be released in 1982, was renamed ZX Spectrum for it's use of colour.

And, IanC, I'm joking about the senility. But it doesn't matter, because by the time you get to this part of the post, you'll have forgotten I mentioned it ;).
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

IanT
Posts: 153
Joined: Fri Aug 25, 2006 3:13 am

Post by IanT » Sun May 06, 2007 9:54 pm

DaveC wrote:Just like to clarify to the IanC who's a year older than me, so obviously losing his memory and going senile ;), that the home computer revolution began with the ZX81 in 1981 and even before that with the ZX80 in 1980. The ZX82, to be released in 1982, was renamed ZX Spectrum for it's use of colour.

And, IanC, I'm joking about the senility. But it doesn't matter, because by the time you get to this part of the post, you'll have forgotten I mentioned it ;).
Forgetting people's names is one of the first signs ... :wink:

Ian.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 11:35 pm

:lol: DaveT and IanC, yup

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Mon May 07, 2007 12:23 am

Well, Ian, I am only one year behind you ;) :D :lol: :oops:

Move along, people. Nothing to see here.
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

Post Reply
164 posts

Who is online

Users browsing this forum: DotBot [Bot] and 5 guests