Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
opengl lighting.....
#11
Can you post a link to the whole program?
Reply
#12
http://fbtk.net/phpBB2/viewtopic.php?p=4675#4675
Reply
#13
Quote:it never seems to surprise me what you know rel thanks..and thanks rpgfan, what does the 'w' stand for? width??

It's the homogeneous coordinate. Calculating it is a bit messy though.

Basically if it's 0 then the coordinate is a point in space of it's 1 then the coord is a vector. Or is it the other way around?

By homogeneous I mean a 3d coordinate being = 0.

Say you have some coordinate like this:

Code:
[code]y'' + y ' + z = f(y)[/code]
converting this to a homo:

Code:
y'' + y ' + z = 0

Easy to factor and solve. That's why unless you'd wan't to do some nasty stuff to your render, you'd stick with homo matrices. :*) god it sounds so ghey!

Code:
ie: x + y + z = 0

in calculus ( I haven't taken any calculus)

w is used like this:

f(x)-g(x)/w

so your coord should be

Code:
x/w + y/w + z/w
Whicj means, better make it = 1 for now...
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#14
(y'' + y ' + z = 0) ain't a homo eq Smile, it's actually (y" + y' = -z) in proper form.

though (y" + y' + y = 0)

If you had (y" + y' = -z) you could solve it by saying:

r^2 + r = 0
r(r+1) = 0
r = 0, -1
yc(x) = c1 + c2 * exp(-x)

and assuming the particular solution takes the form of -z, you have duplication, so you multiply by x:

yp(x) = c3 * x

and then find c3 by plugging in:

yp'(x) = c3
yp"(x) = 0

0 + c3 = -z

so c3 = -z...

and your final solution is the sum of yc and yp:
y(x) = c1 - z*x + c2*exp(-x)

yay, I have a test on this crap in an hour Big Grin

EDIT: aw, crap, z must be a variable, so I'm supposed to be using systems. Nuts, see, now I'm going to fail, thanks a lot, Rel.
Reply
#15
:lol:

You worry too much.
Reply
#16
Quote:yay, I have a test on this crap in an hour Big Grin
lol are you serious. I had one a few days ago, but was a little more complex also involving triple integrals and inconservative vector fields.


Anyway, let me continue Toonski/Jofers's story Tongue

ay" + by' + cy = z(x)

is solved by first solving
ay" + by' + cy = 0
and then for z(x)

ay" + by' + cy = 0 is solved easily by solving
ar^2 + br + c = 0 for r
2 solutions: y = c1*e^(r1*x) + c2*e^(r2*x) in which c1 and c2 are constants and r1 r2 are both solutions
1 solution: y = c1*e^(r1*x) + c2*x*e^(r1*x)
2 complex solutions in form a+bi: y = c1*e^(a1*x)*cos(b1*x) + c2*e^(a1*x)*sin(b1*x)


... i'm sleepy... lol continue in this book if you're interested.
Reply
#17
hehehe its amazing the math you guys know,,,
think someone could whip up a little collision routine for quads and camera..?? eg.. player is comtrolled by the glulookat command, and the world is drawn with quads! should be simple with the math you guys know!! keep in mind i want to have floor collision as well, so i can go upstairs. :???:

e=mc^2,peanut butter and chocolate go good together,and vertices and vectors are a pain in my ass!! :rotfl:

p.s. did i mention i want to make a 3d shooter, and learn absolutely nothing about vertices,vectors,and matrices? :bounce: :bounce: :bounce:
Reply
#18
:lol: you're doomed. :lol: :wink:
ttp://m0n573r.afraid.org/
Quote:quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)