OZONE Asylum
Forums
OZONE
Calculate RGB values between two colours
This page's ID:
28533
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
How about vectors? // starting values v1x, v1y, v1z v2x, v2y, v2z // delta between the xyz axis dx=v2x-v1x dy=v2y-v1y dz=v2z-v1z // pythagoras to get the distance distance = sqr( dx*dx + dy*dy + dz*dz ) // get the unit vectors ux=dx/distance uy=dy/distance uz=dz/distance Once you have the unit vectors and distance, just a matter of dividing, multiplying, and adding it up like TP said. mult=distance/12.0 for(i==1;i>10;i++){ newx=v1x+ux*i*mult newy=v1y+uy*i*mult newz=v1z+uz*i*mult } Ahhh... something like that. Bit of a long way compared to what TP said, but this is how I would go about it. No real reason other than being a freak for vectors. They are just so much fun to play with.
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »