Topic awaiting preservation: Wraytracer & Division (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-13-2003 16:20
Hey! |
Paranoid (IV) Inmate From: everywhere |
posted 05-13-2003 16:35
A few months ago I had to write a calculator which could work with up to 60-digit integers, in VB (euch). The obvious way to structure the number there was to have an array of length 60. Then array[n] represented its value x 10^(n-1). Obviously you'd wanna modify it to work with decimal places though. Hope that gives you seem lead, I expect someone else will be able to give you more specific help. |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-13-2003 16:37
Yeah, I thought of that, thats how it works. Ill have a fiddle, but Im not hopeful. I was hoping to do something along the line of a distributed network like SETI or www.mersenne.org, but in javascipt. Oh well. |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 05-13-2003 22:43
Slime here also made a raytracer: http://www.slimeland.com/raytrace/help.html |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-15-2003 16:52
Yeah, it is sort of similar to slimes. Iv seen his before, and I thought I would try to do what he managed. Then I finally finished it, had a look on slime's website to cpmpare...and found his new one. Its just not even funny, its unbelievable. But I dint copy any of his code (take a look at out codes, his is about a thousand times mor efficient....) |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 05-15-2003 17:00
"YKYHBRTLW" <- That an acronym or frustration with the keyboard ? |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-15-2003 17:42
It stands for "You Know You Have Been Raytracing Too Long When", and then you add an ending. I dont know what I would add though, Im extremely lacking in wittiness... |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 05-16-2003 07:38
I also noticed the similarity, but saw that you coded yours very differently. =) Nicely done, making it in 5K! I don't have the patience for that. =) |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-17-2003 16:43
Sorry slime, I nicked your css code, but it was just sort of an odd form of homage... |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 05-17-2003 17:00
The poster has demanded we remove all his contributions, less he takes legal action. |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-17-2003 20:06
Thanks for the suggestion, Ill probably have a fiddle sometime today or tomorrow. But unfortunately I cant just add the figures on the end, because of the formula. It goes like this: |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 05-18-2003 21:47
The poster has demanded we remove all his contributions, less he takes legal action. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 05-19-2003 08:55
quote:
|
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-19-2003 09:36
Sorry slime, I didnt mean literally by age (Im not worried about that, I love mathematics, Im going to do further maths for A-level), but its just that I have never been taught the relevant stuff, and I was just wondering when I would. (I have spent considerable time recently looking at P3 books...). Writing it was hell. Id never been taught so much as 2d vectors, let alone 3d or dot products or cross products or anything. Combined with the fact that none of my friends write javascript, it resulted in a few quite frustrating hours. I think the worst must have been the cross products. Working out the code to get the ray angles just hurt. But it worked, so hey! Im happy. The other really hard bit was doing the colours. Stupidly, I started off doing the colours by hex, which I didnt understand very well. One of my last changes to it was to convert it all to the colour system it now uses. Im still not sure about the diffuse shading on the planes though...any ideas? |
Paranoid (IV) Inmate From: France |
posted 05-19-2003 13:57
wrayal:. I already reacted to your great work on http://www.javascript-games.org forum. |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-19-2003 14:09
Thanks poi, but unforuntely I cant go on javascript-games.org very often anymore, school blocked it simply because it had the word "game" in the tile. Irritating gits. Oh well...many of the people from that forum are on here as well, plus we have genii like slime here... |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-19-2003 18:01
slime! I love you! (in a totally platonic way of course...) I spent a bit of today fiddling through what you told me, then realised that to get the roots of t you just shove it through the quadratic formula, legendary! Time to try and apply it to other primitives....Thankyou so much! (Why is it that virtually every topic has praise for slime somewhere in it?). You said you need things like the quadratic formula though, are there others I am going to need to learn? Its totally logical, but I had just never really thought of it. Thankyou so much! Time to work out all those other starting point formulas. Fun. |
Bipolar (III) Inmate From: Cranleigh, Surrey, England |
posted 05-20-2003 16:07
Sorry, you are all probably totally sick of thje whole topic of raytracing, but can I just ask one more question? I sorted out deriving the formula for a sphere, but I tried applying it to a plane...and failed miserably. Do you have any tips on working out the original starting equation, like (centre-x)^2=r^2 for a sphere? Any help would be greatly appreciated! |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 05-20-2003 20:57
The formula for a plane, where the plane is defined as a normal vector and a distance from the origin, can be found by using the dot product between the normal and (the point being evaluated) minus (the normal times the the distance from the origin). Draw a picture and see if you can figure out why this is the case. |