<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - 3D visualizer :: PQ Torus :: open source flash / flex / as3]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/578/"/>
	<updated>2010-02-08T14:39:57Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/578/3d-visualizer-pq-torus-open-source-flash-flex-as3/</id>
		<entry>
			<title type="html"><![CDATA[Re: 3D visualizer :: PQ Torus :: open source flash / flex / as3]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/9680/#p9680"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>arfink wrote:</cite><blockquote><p>One thought- make one where as it draws it fades the older lines, so what you can constantly have glowing particles whipping around the camera when it&#039;s zoomed in. It would look really cool.</p></blockquote></div><p>agreed, <br />good idea, i will experiment with that</p><p>thanx!</p>]]></content>
			<author>
				<name><![CDATA[xero]]></name>
				<uri>https://chipmusic.org/xero</uri>
			</author>
			<updated>2010-02-08T14:39:57Z</updated>
			<id>https://chipmusic.org/forums/post/9680/#p9680</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 3D visualizer :: PQ Torus :: open source flash / flex / as3]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/9001/#p9001"/>
			<content type="html"><![CDATA[<p>Nice work. I listened to Firestorm&#039;s IK+ remix and Ooh La La by Slyspy while playing with this. Amazing stuff, matched the music rather nicely. (hint, Demovibes 9)</p><p>One thought- make one where as it draws it fades the older lines, so what you can constantly have glowing particles whipping around the camera when it&#039;s zoomed in. It would look really cool.</p>]]></content>
			<author>
				<name><![CDATA[arfink]]></name>
				<uri>https://chipmusic.org/arfink</uri>
			</author>
			<updated>2010-02-04T20:02:17Z</updated>
			<id>https://chipmusic.org/forums/post/9001/#p9001</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 3D visualizer :: PQ Torus :: open source flash / flex / as3]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/8994/#p8994"/>
			<content type="html"><![CDATA[<p>Hello, <br />Waooow ! It&#039;s very nice. It works perfectly ! Bravo !</p>]]></content>
			<author>
				<name><![CDATA[jikoo]]></name>
				<uri>https://chipmusic.org/jikoo</uri>
			</author>
			<updated>2010-02-04T19:48:19Z</updated>
			<id>https://chipmusic.org/forums/post/8994/#p8994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[3D visualizer :: PQ Torus :: open source flash / flex / as3]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/8504/#p8504"/>
			<content type="html"><![CDATA[<p><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.jpg" id="forum_image_2210955"><img src="http://the.fontvir.us/b10g/img/PQtorus.jpg" /></a></p><p>view demo :: <a href="http://the.fontvir.us/pv3d/PQtorus/" target="_blank">http://the.fontvir.us/pv3d/PQtorus/</a><br />view sources:: <a href="http://the.fontvir.us/pv3d/PQtorus/srcview/" target="_blank">http://the.fontvir.us/pv3d/PQtorus/srcview/</a><br />view blog post :: <a href="http://the.fontvir.us/b10g/?id=116" target="_blank">http://the.fontvir.us/b10g/?id=116</a></p><p>here we go again, another papervision3D demo featuring math permeated lines. <br />this time im working with a classic piece of code known as the PQ torus. the vague <br />idea is that you have 2 numbers (P + Q) that are used in the algorithm to define the <br />knot. in general, given P + Q mutually prime, the line wraps meridionally around the <br />torus P times and wraps the longitudinally around it Q times. i was having some <br />trouble grasping exactly how this was going to be achieved, until i read <a href="http://www.blackpawn.com/texts/pqtorus/" target="_blank">this article</a> <br />on <a href="http://www.blackpawn.com/" target="_blank">blackpawn</a>’s website. he really breaks down the algo to a very simplistic level...</p><div class="codebox"><pre><code>r = .5 * (2 + sin(Q * Φ))
x = r * cos(P * Φ)
y = r * cos(Q * Φ)
z = r * sin(P * Φ)</code></pre></div><p>simple right? lol.<br />so Φ (or phi in my code) is basically a variable that is definded by change. <br />in this case, im simply incrementing phi + .02 every frame. this seeds the <br />math and gives you the cool visual effect.</p><p>anyway, after getting a handle on the math, writing the demo code was a snap. <br />i took the existing code i wrote from the <a href="http://the.fontvir.us/b10g/?id=109" target="_blank">3D object tracer</a> and the <a href="http://the.fontvir.us/b10g/?id=107" target="_blank">lorenz attractor </a><br />and combined them. (i also found + fixed an error for computing the line gradient <br />color) i started out by allowing the users to only select values for PQ and that <br />actually made sense.</p><p><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.5-3.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.5-3.jpg" id="forum_image_10364790"><img src="http://the.fontvir.us/b10g/img/PQtorus.5-3.jpg" /></a><br /><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.7-4.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.7-4.jpg" id="forum_image_1441621"><img src="http://the.fontvir.us/b10g/img/PQtorus.7-4.jpg" /></a></p><p>but after some experimentation i found that using some unorthodox values <br />for P+Q could net some very interesting results. take a look at some of these...</p><p><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.5-16.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.5-16.jpg" id="forum_image_6967786"><img src="http://the.fontvir.us/b10g/img/PQtorus.5-16.jpg" /></a><br /><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.40-25.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.40-25.jpg" id="forum_image_60352594"><img src="http://the.fontvir.us/b10g/img/PQtorus.40-25.jpg" /></a><br /><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.25-50.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.25-50.jpg" id="forum_image_67339423"><img src="http://the.fontvir.us/b10g/img/PQtorus.25-50.jpg" /></a><br /><a class="postimg" href="http://the.fontvir.us/b10g/img/PQtorus.33-50.jpg" title="http://the.fontvir.us/b10g/img/PQtorus.33-50.jpg" id="forum_image_85569288"><img src="http://the.fontvir.us/b10g/img/PQtorus.33-50.jpg" /></a></p><p>e n j o y !</p>]]></content>
			<author>
				<name><![CDATA[xero]]></name>
				<uri>https://chipmusic.org/xero</uri>
			</author>
			<updated>2010-02-02T19:40:06Z</updated>
			<id>https://chipmusic.org/forums/post/8504/#p8504</id>
		</entry>
</feed>
