Create Journals
Update Journals

Journals
Find Users
Random

Read
Search
Create New

Communities
Latest News
How to Use

Support
Privacy
T.O.S.

Legal
Username:
Password:

ClaudiusMaximus (claudiusmaximus) wrote,
@ 2008-06-27 18:13:00
Previous Entry  Add to memories!  Add to Topic Directory  Tell a Friend!  Next Entry

    ray42 : nD raytracing

    I've been rewriting ray4 from scratch in C++, extending it to arbitrary dimensions, providing various Constructive Solid Geometry operations, trying out procedural textures, playing around in general. It's way too slow though, the ray tracing algorithm is completely naive and tests every object against every ray, no oct-tree optimisations here. But it seems to generate some pretty pictures, or even animations, if you're prepared to wait a while.

    ray42 gallery

    So far I've tested with 3D and 4D, and it seems to work to some extent.

    Meanwhile, way back in 2006 I was trying to make a compound of five cubes, well it turned out my maths was wrong - instead of (Scheme):

    (define A (* 90 (atan (* 2 (- 0.5 (/ (- (sqrt 5) 2) (- 3 (sqrt 5))))))))

    I should have been using (C++):

    double a(std::atan(2.0l / (1.0l + std::sqrt(5.0l))));

    Now the corners line up perfectly:

    compound of five cubes

    Hooray!



(Read comments)

Post a comment in response:

From:
 
Username:  Password: 
Subject:
No HTML allowed in subject
 Don't auto-format:
Message:
Enter the security code below.


Notice! This user has turned on the option that logs your IP address when posting.

Allowed HTML: <a> <abbr> <acronym> <address> <area> <b> <bdo> <big> <blockquote> <br> <caption> <center> <cite> <code> <col> <colgroup> <dd> <dd> <del> <dfn> <div> <dl> <dt> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <ins> <kbd> <li> <li> <map> <marquee> <ol> <p> <pre> <q> <s> <samp> <small> <span> <strike> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <tt> <u> <ul> <var> <xmp>
© 2002-2008. Blurty Journal. All rights reserved.