Winamp & Shoutcast Forums > AVS raytracing: inside and outside sphere
 User Name Remember Me? Password

 Thread Tools Search this Thread Display Modes
 28th January 2004, 12:36 #1 your-dentist Junior Member   Join Date: Jan 2004 Location: berlin, germany Posts: 44 raytracing: inside and outside sphere it took me only two days to understand the basics of raytracing and to make my first planes and tunnels DMs, just with the help of the easy to understand explantions by UnConeD. Due to my bad math skill I can make more complex objects. So I simply copied the "k" for a sphere from one of UnConeD's tuts. What I don't understand is how to move the camera out of the shere. when the cam coords are something like oz=1 it's inside and distorts the sphere. in discoball the z-coord is oz=sin(t)+1.9 or something. who can explain me how to the camera outside of and object in general? (also for cylinders)
 28th January 2004, 15:17 #2 UnConeD Whacked Moderator     Join Date: Jun 2001 Posts: 2,104 The problem is that you need to pick the closest intersection point to the camera: for a sphere, there are usually two. If your camera only stays outside or inside, you can always use the same formula, otherwise you need to calculate both and compare them. Copying k codes is pretty dumb though: the equation for a sphere around the origin is: x^2 + y^2 + z^2 = radius^2 If you've read my little raytracing intro, this should be enough to get you started and derive the k formula yourself.
 30th January 2004, 08:48 #3 your-dentist Junior Member   Join Date: Jan 2004 Location: berlin, germany Posts: 44 thx. got it now, my own in and out sphere. it was just one sign in the "k" formula. I still need lots of "training".
 3rd February 2012, 18:03 #4 patipano Junior Member   Join Date: Jan 2012 Posts: 20 Hey! What preset (or AVS Pack) of UnConed that explain about ray tracing and not very hard to understand?
 Winamp & Shoutcast Forums > AVS raytracing: inside and outside sphere
 User Name Remember Me? Password

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Tech Support Greatest Hits Winamp     Winamp Technical Support     Winamp Discussion     Winamp Wishlist     Winamp Bug Reports     Winamp for Android     Winamp Site Design Shoutcast     Shoutcast Technical Support     Shoutcast Discussions     Shoutcast For Business & Monetization     Shoutcast Site Design International Connection     International Connection     Русскоязычный форум (Russian)     Français: de l'aide pour les francophones (French)     Winamp Deutsch (German) Community Center     General Discussions     Breaking News     Music O'Rama     Games Center     Movies and Television     The Bitchlist Skinning and Design     Skinning Tips and Tricks     Classic Skins     Modern Skins     Arts and Design Developer Center     Winamp Development     NSIS Discussion         NSIS Translations Visualizations     AVS         AVS Presets         AVS Wishlist         AVS Troubleshooting     MilkDrop         MilkDrop Presets         MilkDrop Development         MilkDrop Feature Requests         MilkDrop Troubleshooting Forum

 -- Deutsch -- English (US) -- Polish -- Russian Winamp.com - Help - Archive - Top