<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: how to rotate a quad, math pls</title>
		<atom:link href="http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/feed</link>
		<description></description>
		<pubDate>Wed, 19 Jun 2013 14:32:23 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-33815</guid>
					<title><![CDATA[how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-33815</link>
					<pubDate>Tue, 25 Sep 2007 20:42:16 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;m looking to rotate a mesh based quad(s). idle with a changeable center of<br />
rotation. a patch would be lovely but the expression used or a link to<br />
further info would help. much.<br />
i wish i could combine mesh based rendering with glrotate&#8230;<br />
yair</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113138</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113138</link>
					<pubDate>Tue, 25 Sep 2007 21:01:50 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>attachment, rotation equation taken from an opengl book</p>
<p>On 9/25/07, yair reshef <yair99 @gmail.com> wrote:<br />
><br />
> I&#8217;m looking to rotate a mesh based quad(s). idle with a changeable center<br />
> of rotation. a patch would be lovely but the expression used or a link to<br />
> further info would help. much.<br />
> i wish i could combine mesh based rendering with glrotate&#8230;<br />
> yair<br />
></yair99></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113139</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113139</link>
					<pubDate>Tue, 25 Sep 2007 21:29:06 +0000</pubDate>
					<dc:creator>Andrew Benson</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,<br />
Here are some jit.expr objects that will do x, y, z rotations with an <br />
anchor at 0.   I had this lying around, so I can&#8217;t tell you what is what.</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 2;<br />
#P newex 188 205 310 196617 jit.expr @expr in[0] <br />
&#8220;in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])&#8221; <br />
&#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 188 170 290 196617 jit.expr @expr <br />
&#8220;in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])&#8221; in[0] <br />
&#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 188 134 297 196617 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) &#8211; <br />
in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])&#8221; <br />
in[0] in[0] in[0];<br />
#P connect 1 0 2 0;<br />
#P connect 0 0 1 0;<br />
#P window clipboard copycount 3;</p>
<p>I don&#8217;t have the time to work it out right now, but you could probably <br />
use a vertex shader to rotate the geometry in a much more efficient way <br />
by passing in vertex attributes or by using one of the jit.gl.mesh <br />
inputs for the rotation amount for each quad and doing the matrix <br />
transformation in the vertex program.  See the recent thread called <br />
&#8220;Setting GLSL attribute variables per vertex with Jitter&#8221; for more info <br />
on using vertex attributes in a shader.</p>
<p>Best,<br />
Andrew B.</p>
<p>yair reshef wrote:<br />
> attachment, rotation equation taken from an opengl book<br />
> <br />
> On 9/25/07, *yair reshef* <yair99 @gmail.com <mailto:yair99@gmail.com>> <br />
> wrote:<br />
> <br />
>     I&#8217;m looking to rotate a mesh based quad(s). idle with a changeable<br />
>     center of rotation. a patch would be lovely but the expression used<br />
>     or a link to further info would help. much.<br />
>     i wish i could combine mesh based rendering with glrotate&#8230;<br />
>     yair<br />
> <br />
> <br />
> <br />
> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
> <br />
> <br />
> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
></yair99></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113140</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113140</link>
					<pubDate>Wed, 26 Sep 2007 00:55:50 +0000</pubDate>
					<dc:creator>vade</dc:creator>

					<description>
						<![CDATA[
						<p>On that note, I checked in the 1.6 docs, and did not see anything  <br />
about vertex attributes.</p>
<p>Also, this is one thing that GEM does quite quite well, using nested  <br />
translation and rotation objects to geometry for transforms. 2.0 PLZ?<br />
K THNX BAI!<br />
:)</p>
<p>On Sep 25, 2007, at 5:29 PM, andrew benson wrote:</p>
<p>> Hello,<br />
> Here are some jit.expr objects that will do x, y, z rotations with  <br />
> an anchor at 0.   I had this lying around, so I can&#8217;t tell you what  <br />
> is what.<br />
><br />
> #P window setfont &#8220;Sans Serif&#8221; 9.;<br />
> #P window linecount 2;<br />
> #P newex 188 205 310 196617 jit.expr @expr in[0] &#8220;in[0].p[1]*cos(in <br />
> [1])-in[0].p[2]*sin(in[1])&#8221; &#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in <br />
> [1])&#8221; in[0] in[0];<br />
> #P newex 188 170 290 196617 jit.expr @expr &#8220;in[0].p[0]*cos(in[1])+in <br />
> [0].p[2]*sin(in[1])&#8221; in[0] &#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in <br />
> [1])&#8221; in[0] in[0];<br />
> #P newex 188 134 297 196617 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) &#8211;  <br />
> in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in <br />
> [1])&#8221; in[0] in[0] in[0];<br />
> #P connect 1 0 2 0;<br />
> #P connect 0 0 1 0;<br />
> #P window clipboard copycount 3;<br />
><br />
> I don&#8217;t have the time to work it out right now, but you could  <br />
> probably use a vertex shader to rotate the geometry in a much more  <br />
> efficient way by passing in vertex attributes or by using one of  <br />
> the jit.gl.mesh inputs for the rotation amount for each quad and  <br />
> doing the matrix transformation in the vertex program.  See the  <br />
> recent thread called &#8220;Setting GLSL attribute variables per vertex  <br />
> with Jitter&#8221; for more info on using vertex attributes in a shader.<br />
><br />
> Best,<br />
> Andrew B.<br />
><br />
><br />
><br />
> yair reshef wrote:<br />
>> attachment, rotation equation taken from an opengl book<br />
>> On 9/25/07, *yair reshef* <yair99 @gmail.com  <br></yair99>
>> <mailto:yair99 @gmail.com>> wrote:<br />
>>     I&#8217;m looking to rotate a mesh based quad(s). idle with a  <br />
>> changeable<br />
>>     center of rotation. a patch would be lovely but the expression  <br />
>> used<br />
>>     or a link to further info would help. much.<br />
>>     i wish i could combine mesh based rendering with glrotate&#8230;<br />
>>     yair<br />
>> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; <br />
>> &#8212;<br />
>> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; <br />
>> &#8212;</mailto:yair99></p>
<p>v a d e //</p>
<p><a href="http://www.vade.info" rel="nofollow">http://www.vade.info</a><br />
abstrakt.vade.info</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113141</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113141</link>
					<pubDate>Wed, 26 Sep 2007 08:12:01 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>thanks Andraw. i have no problem as of yet with mesh vertex performances.<br />
works great. included is a patch implemnting your math for the internet to<br />
store.</p>
<p>On 9/25/07, vade <doktorp @mac.com> wrote:<br />
><br />
> On that note, I checked in the 1.6 docs, and did not see anything about<br />
> vertex attributes.<br />
> Also, this is one thing that GEM does quite quite well, using nested<br />
> translation and rotation objects to geometry for transforms. 2.0 PLZ?<br />
> K THNX BAI!<br />
> :)<br />
><br />
> On Sep 25, 2007, at 5:29 PM, andrew benson wrote:<br />
><br />
> Hello,<br />
> Here are some jit.expr objects that will do x, y, z rotations with an<br />
> anchor at 0.   I had this lying around, so I can&#8217;t tell you what is what.<br />
><br />
> #P window setfont &#8220;Sans Serif&#8221; 9.;<br />
> #P window linecount 2;<br />
> #P newex 188 205 310 196617 jit.expr @expr in[0]<br />
> &#8220;in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])&#8221;<br />
> &#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])&#8221; in[0] in[0];<br />
> #P newex 188 170 290 196617 jit.expr @expr<br />
> &#8220;in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])&#8221; in[0]<br />
> &#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])&#8221; in[0] in[0];<br />
> #P newex 188 134 297 196617 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) -<br />
> in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])&#8221; in[0]<br />
> in[0] in[0];<br />
> #P connect 1 0 2 0;<br />
> #P connect 0 0 1 0;<br />
> #P window clipboard copycount 3;<br />
><br />
> I don&#8217;t have the time to work it out right now, but you could probably use<br />
> a vertex shader to rotate the geometry in a much more efficient way by<br />
> passing in vertex attributes or by using one of the jit.gl.mesh inputs for<br />
> the rotation amount for each quad and doing the matrix transformation in the<br />
> vertex program.  See the recent thread called &#8220;Setting GLSL attribute<br />
> variables per vertex with Jitter&#8221; for more info on using vertex attributes<br />
> in a shader.<br />
><br />
> Best,<br />
> Andrew B.<br />
><br />
><br />
><br />
> yair reshef wrote:<br />
><br />
> attachment, rotation equation taken from an opengl book<br />
> On 9/25/07, *yair reshef* <yair99 @gmail.com <mailto:yair99@gmail.com<yair99@gmail.com>>><br />
> wrote:<br />
>     I&#8217;m looking to rotate a mesh based quad(s). idle with a changeable<br />
>     center of rotation. a patch would be lovely but the expression used<br />
>     or a link to further info would help. much.<br />
>     i wish i could combine mesh based rendering with glrotate&#8230;<br />
>     yair<br />
> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
><br />
><br />
><br />
> *v a d e //*<br />
><br />
> *www.vade.info*<br />
> *abstrakt.vade.info*<br />
><br />
><br />
><br />
><br />
><br />
></yair99></doktorp></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113142</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113142</link>
					<pubDate>Wed, 26 Sep 2007 08:14:30 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 210 326 56 9109513 jit.unpack 3;<br />
#P user jit.cellblock 396 349 488 386 139 9 2 2 45 17 0 1 1 0 0 0 0 0 1 0 0<br />
0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;<br />
#P user jit.cellblock 303 349 395 386 139 9 2 2 45 17 0 1 1 0 0 0 0 0 1 0 0<br />
0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;<br />
#P user jit.cellblock 210 349 302 386 139 9 2 2 45 17 0 1 1 0 0 0 0 0 1 0 0<br />
0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0;<br />
#P message 433 130 29 9109513 reset;<br />
#B color 3;<br />
#P newex 434 150 43 9109513 t 0 reset;<br />
#P message 97 335 29 9109513 reset;<br />
#P newex 125 335 72 9109513 jit.gl.handle rott;<br />
#P flonum 460 280 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 460 241 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 454 189 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P newex 26 299 469 9109513 jit.expr @expr in[0]<br />
&#8220;in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])&#8221;<br />
&#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 26 259 469 9109513 jit.expr @expr<br />
&#8220;in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])&#8221; in[0]<br />
&#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 26 206 463 9109513 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) -<br />
in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])&#8221; in[0]<br />
in[0];<br />
#N vpatcher 15 55 281 431;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 0;<br />
#P newex 144 280 27 9109513 * -1.;<br />
#P window linecount 3;<br />
#P comment 198 315 23 9109513 min scale;<br />
#P window linecount 1;<br />
#P comment 82 302 58 9109513 max scale;<br />
#P newex 41 204 27 9109513 * 1.;<br />
#P window setfont &#8220;Sans Serif&#8221; 12.;<br />
#P number 57 182 35 12 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P newex 41 156 57 9109513 t f f;<br />
#P newex 41 279 27 9109513 &#8211; 0.;<br />
#P message 41 325 59 9109513 0.8284;<br />
#B color 4;<br />
#P message 41 304 34 9109513 set $1;<br />
#P newex 27 29 54 9109513 delay 1000;<br />
#P newex 83 27 23 9109513 r fs;<br />
#P newex 172 182 50 9109513 / 2.;<br />
#P message 172 226 50 9109513 0.8284;<br />
#P message 172 205 50 9109513 set $1;<br />
#P newex 88 211 27 9109513 / 2.;<br />
#P message 144 324 46 9109513 -0.8284;<br />
#B color 4;<br />
#P message 144 303 34 9109513 set $1;<br />
#P newex 106 89 64 9109513 r fromRender;<br />
#P window linecount 2;<br />
#P comment 125 56 100 9109513 2. Calculate width and height in GL;<br />
#P window linecount 1;<br />
#P comment 181 140 35 9109513 height;<br />
#P flonum 106 156 59 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 172 156 59 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window linecount 3;<br />
#P message 27 50 72 9109513 getdest_dim , getcamera , getlens_angle;<br />
#P window linecount 1;<br />
#N vpatcher 385 97 759 364;<br />
#P outlet 131 150 15 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 0;<br />
#P newex 131 128 29 9109513 * 1.;<br />
#P window linecount 1;<br />
#P message 270 77 20 9109513 $2;<br />
#P message 248 77 20 9109513 $1;<br />
#P newex 248 95 32 9109513 / 1.;<br />
#P message 102 70 20 9109513 $3;<br />
#P newex 50 92 184 9109513 expr $f2*2*tan($f1/2*3.1415/180);<br />
#P newex 50 50 164 9109513 route lens_angle camera dest_dim;<br />
#P inlet 50 30 15 0;<br />
#P outlet 166 152 15 0;<br />
#P connect 1 0 2 0;<br />
#P connect 2 0 3 0;<br />
#P connect 2 1 4 0;<br />
#P fasten 3 0 8 0 55 115 136 115;<br />
#P connect 8 0 9 0;<br />
#P fasten 5 0 8 1 253 118 155 118;<br />
#P fasten 3 0 0 0 55 115 171 115;<br />
#P fasten 4 0 3 1 107 88 229 88;<br />
#P fasten 2 2 6 0 157 73 253 73;<br />
#P connect 6 0 5 0;<br />
#P fasten 2 2 7 0 157 73 275 73;<br />
#P connect 7 0 5 1;<br />
#P pop;<br />
#P newobj 106 112 76 9109513 p CalcGLHeight;<br />
#P comment 113 140 35 9109513 width;<br />
#P newex 27 101 42 9109513 s render;<br />
#P connect 15 0 16 0;<br />
#P connect 16 0 3 0;<br />
#P fasten 3 0 0 0 32 97 32 97;<br />
#P fasten 2 0 20 0 111 137 46 137;<br />
#P connect 20 0 22 0;<br />
#P connect 22 0 19 0;<br />
#P connect 19 0 17 0;<br />
#P connect 17 0 18 0;<br />
#P connect 21 0 22 1;<br />
#P fasten 11 0 19 1 93 254 63 254;<br />
#P connect 20 1 11 0;<br />
#P connect 8 0 2 0;<br />
#P fasten 2 0 5 0 111 135 111 135;<br />
#P fasten 11 0 25 0 93 254 149 254;<br />
#P connect 25 0 9 0;<br />
#P connect 9 0 10 0;<br />
#P fasten 2 1 4 0 177 135 177 135;<br />
#P fasten 4 0 14 0 177 176 177 176;<br />
#P connect 14 0 12 0;<br />
#P connect 12 0 13 0;<br />
#P pop;<br />
#P newobj 142 84 44 9109513 p glwidth;<br />
#P user jit.pwindow 261 26 162 122 0 0 0 0 1 0;<br />
#X name rott;<br />
#P objectname rott;<br />
#P flonum 70 49 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P toggle 23 32 33 0;<br />
#P newex 23 74 57 9109513 qmetro 33;<br />
#P newex 26 362 142 9109513 jit.gl.mesh rott @poly_mode 1 1;<br />
#P newex 23 96 53 9109513 t b b erase;<br />
#P newex 26 175 164 9109513 jit.matrix data 3 float32 2 2 <a href='http://cycling74.com/forums/users/adapt/' rel='nofollow' class='bbp-mention-link adapt'>@adapt</a> 0;<br />
#P newex 26 152 306 9109513 jit.gl.gridshape @automatic 0 @dim 2 2<br />
@matrixoutput 1 @shape plane;<br />
#P newex 23 125 138 9109513 jit.gl.render rott @camera 0 0 4;<br />
#P window linecount 2;<br />
#P comment 134 45 100 9109513 how to roatte a mesh based quad;<br />
#P connect 7 0 6 0;<br />
#P connect 6 0 4 0;<br />
#P connect 4 0 1 0;<br />
#P fasten 4 2 1 0 70 119 28 119;<br />
#P fasten 4 1 2 0 49 147 31 147;<br />
#P connect 2 0 3 0;<br />
#P connect 3 0 11 0;<br />
#P connect 11 0 12 0;<br />
#P connect 12 0 13 0;<br />
#P connect 13 0 5 0;<br />
#P fasten 17 0 5 0 130 357 31 357;<br />
#P connect 8 0 6 1;<br />
#P connect 18 0 17 0;<br />
#P hidden fasten 19 1 17 0 472 175 130 175;<br />
#P fasten 13 0 24 0 31 322 215 322;<br />
#P connect 24 0 21 0;<br />
#P fasten 24 1 22 0 230 346 308 346;<br />
#P fasten 24 2 23 0 245 346 401 346;<br />
#P connect 20 0 19 0;<br />
#P hidden fasten 19 0 14 0 439 186 459 186;<br />
#P hidden fasten 19 0 15 0 439 238 465 238;<br />
#P hidden fasten 19 0 16 0 439 279 465 279;<br />
#P connect 14 0 11 1;<br />
#P connect 15 0 12 1;<br />
#P connect 16 0 13 1;<br />
#P window clipboard copycount 25;</p>
<p>long live the shatter< <a href="http://www.cycling74.com/download/articles/JitterRecipes-Book3/37.Shatter.zip" rel="nofollow">http://www.cycling74.com/download/articles/JitterRecipes-Book3/37.Shatter.zip></p>
<p>On 9/26/07, yair reshef <yair99 @gmail.com> wrote:<br />
><br />
> thanks Andraw. i have no problem as of yet with mesh vertex performances.<br />
> works great. included is a patch implemnting your math for the internet to<br />
> store.<br />
><br />
><br />
><br />
> On 9/25/07, vade <doktorp @mac.com> wrote:<br />
> ><br />
> > On that note, I checked in the 1.6 docs, and did not see anything about<br />
> > vertex attributes.<br />
> > Also, this is one thing that GEM does quite quite well, using nested<br />
> > translation and rotation objects to geometry for transforms. 2.0 PLZ?<br />
> > K THNX BAI!<br />
> > :)<br />
> ><br />
> > On Sep 25, 2007, at 5:29 PM, andrew benson wrote:<br />
> ><br />
> > Hello,<br />
> > Here are some jit.expr objects that will do x, y, z rotations with an<br />
> > anchor at 0.   I had this lying around, so I can&#8217;t tell you what is<br />
> > what.<br />
> ><br />
> > #P window setfont &#8220;Sans Serif&#8221; 9.;<br />
> > #P window linecount 2;<br />
> > #P newex 188 205 310 196617 jit.expr @expr in[0]<br />
> > &#8220;in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])&#8221;<br />
> > &#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])&#8221; in[0] in[0];<br />
> > #P newex 188 170 290 196617 jit.expr @expr<br />
> > &#8220;in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])&#8221; in[0]<br />
> > &#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])&#8221; in[0] in[0];<br />
> > #P newex 188 134 297 196617 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) -<br />
> > in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])&#8221; in[0]<br />
> > in[0] in[0];<br />
> > #P connect 1 0 2 0;<br />
> > #P connect 0 0 1 0;<br />
> > #P window clipboard copycount 3;<br />
> ><br />
> > I don&#8217;t have the time to work it out right now, but you could probably<br />
> > use a vertex shader to rotate the geometry in a much more efficient way by<br />
> > passing in vertex attributes or by using one of the jit.gl.mesh inputs<br />
> > for the rotation amount for each quad and doing the matrix transformation in<br />
> > the vertex program.  See the recent thread called &#8220;Setting GLSL<br />
> > attribute variables per vertex with Jitter&#8221; for more info on using vertex<br />
> > attributes in a shader.<br />
> ><br />
> > Best,<br />
> > Andrew B.<br />
> ><br />
> ><br />
> ><br />
> > yair reshef wrote:<br />
> ><br />
> > attachment, rotation equation taken from an opengl book<br />
> > On 9/25/07, *yair reshef* <yair99 @gmail.com < mailto:yair99@gmail.com<yair99@gmail.com>>><br />
> > wrote:<br />
> >     I&#8217;m looking to rotate a mesh based quad(s). idle with a changeable<br />
> >     center of rotation. a patch would be lovely but the expression used<br />
> >     or a link to further info would help. much.<br />
> >     i wish i could combine mesh based rendering with glrotate&#8230;<br />
> >     yair<br />
> > &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
> > &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
> ><br />
> ><br />
> ><br />
> ><br />
> >  * v a d e //*<br />
> ><br />
> > * <a href="http://www.vade.info" rel="nofollow">http://www.vade.info</a>*<br />
> > * abstrakt.vade.info*<br />
> ><br />
> ><br />
> ><br />
> ><br />
> ><br />
> ><br />
></yair99></doktorp></yair99></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113143</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113143</link>
					<pubDate>Wed, 26 Sep 2007 16:45:43 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>
On Sep 25, 2007, at 5:55 PM, vade wrote:</p>
<p>> On that note, I checked in the 1.6 docs, and did not see anything  <br />
> about vertex attributes.</p>
<p>Relatively experimental feature at the time of doc writing. Forum for  <br />
vertex attr info is best.</p>
<p>> Also, this is one thing that GEM does quite quite well, using  <br />
> nested translation and rotation objects to geometry for transforms.  <br />
> 2.0 PLZ? K THNX BAI!</p>
<p>
These objects are just a bang chain with the gltranslate, glrotate,  <br />
glscale calls. You can easily simulate this stuff in jit.gl.sketch.  <br />
If you need a bang chain, just make a few jit.gl.sketch @immediate 1  <br />
wrappers and use @automatic 0 for the objects. It&#8217;s *really* simple  <br />
if you want to program procedural bang chains like this. It&#8217;s just  <br />
not the paradigm we&#8217;re going to focus our object set on.</p>
<p>-Joshua</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113144</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113144</link>
					<pubDate>Wed, 26 Sep 2007 20:19:48 +0000</pubDate>
					<dc:creator>vade</dc:creator>

					<description>
						<![CDATA[
						<p>Hi, Im either having a brain fart or I am misunderstanding</p>
<p>would you mind explaining?</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P flonum 379 133 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 344 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window linecount 1;<br />
#P newex 265 180 113 196617 pak gltranslate 0. 0. 0.;<br />
#P flonum 294 131 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 167 311 238 196617 jit.gl.gridshape v001 @automatic 0 @shape  <br />
sphere;<br />
#P newex 232 209 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P user jit.fpsgui 17 277 60 196617 0;<br />
#P newex 172 141 66 196617 t b b b b b;<br />
#P toggle 17 32 15 0;<br />
#P newex 17 58 51 196617 qmetro 2;<br />
#P newex 17 96 58 196617 t b b erase;<br />
#P newex 17 249 92 196617 jit.gl.render v001;<br />
#P window linecount 2;<br />
#P comment 432 37 341 196617 this patch does not have render to  <br />
texture enabled for simplicities sake , so just disabled the  <br />
videoplane if you wish to test your geometry effects.;<br />
#P connect 10 0 7 0;<br />
#P connect 5 4 7 0;<br />
#P connect 12 0 10 3;<br />
#P connect 11 0 10 2;<br />
#P connect 5 0 8 0;<br />
#P connect 9 0 10 1;<br />
#P connect 4 0 3 0;<br />
#P connect 3 0 2 0;<br />
#P connect 2 0 1 0;<br />
#P connect 2 2 1 0;<br />
#P connect 1 0 6 0;<br />
#P fasten 2 1 5 0 46 127 177 127;<br />
#P window clipboard copycount 13;</p>
<p>
is not working as I expect?</p>
<p>Thank for the heads up. I had forgotten about immediate mode.</p>
<p>Curious,</p>
<p>thanks,</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113145</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113145</link>
					<pubDate>Wed, 26 Sep 2007 21:45:39 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>
On Sep 26, 2007, at 1:19 PM, vade wrote:</p>
<p>> would you mind explaining?</p>
<p>
Below is a patch that demonstrates the basics, along with a little  <br />
bit of fun. There are a few important things you were lacking:</p>
<p>1. specify the modelview matrix mode<br />
2. push/pop the modelview matrix before/after bang chain<br />
3. use the drawraw message to any objects you are drawing. otherwise  <br />
a variety of state is reset.</p>
<p>Also, you need to make sure you don&#8217;t dispose/recreate the window  <br />
while this stuff is happening or else you could crash. immediate mode  <br />
doesn&#8217;t seem to be 100% safe at the moment for that case. Let me know  <br />
if it still isn&#8217;t clear.</p>
<p>Anyway, this is basically the model GEM uses from what I understand,  <br />
and can be simulated with abstractions, without much overhead. FWIW,  <br />
in Jitter 2.0, we are definitely going to think about issues of  <br />
hierarchy, but not within this procedural bang chain model.</p>
<p>-Joshua</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P newex 298 451 69 196617 loadmess 0.5;<br />
#P newex 296 532 69 196617 loadmess 0.2;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 352 169 570 196622 fun time uzi zone (switch to the uzi  <br />
for iterated multiple drawing);<br />
#P user gswitch2 282 165 39 32 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P flonum 351 353 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P newex 326 372 35 196617 * 36.;<br />
#P newex 311 211 40 196617 uzi 10;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 189 34 570 196622 simple jit.gl.sketch &#8220;bang chain&#8221;  <br />
example ;;<br />
#P comment 353 585 364 196622 matrixmode + scale;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#N vpatcher 30 89 630 489;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P message 218 76 123 196617 glmatrixmode modelview;<br />
#P newex 134 123 100 196617 pack glscale 1. 1. 1.;<br />
#P newex 50 50 179 196617 t b b b;<br />
#P newex 134 151 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P inlet 50 30 15 0;<br />
#P inlet 170 103 15 0;<br />
#P inlet 206 103 15 0;<br />
#P inlet 242 103 15 0;<br />
#P outlet 50 154 15 0;<br />
#P connect 4 0 6 0;<br />
#P connect 6 0 0 0;<br />
#P connect 6 1 7 0;<br />
#P fasten 8 0 5 0 223 96 271 96 271 144 139 144;<br />
#P connect 7 0 5 0;<br />
#P connect 3 0 7 1;<br />
#P connect 2 0 7 2;<br />
#P connect 6 2 8 0;<br />
#P connect 1 0 7 3;<br />
#P pop;<br />
#P newobj 278 579 53 196617 p scale;<br />
#P flonum 368 554 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 331 554 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 295 554 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 353 504 364 196622 matrixmode + translate;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#N vpatcher 30 89 630 489;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P message 218 76 123 196617 glmatrixmode modelview;<br />
#P newex 134 123 118 196617 pack gltranslate 0. 0. 0.;<br />
#P newex 50 50 179 196617 t b b b;<br />
#P newex 134 151 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P inlet 50 30 15 0;<br />
#P inlet 170 103 15 0;<br />
#P inlet 206 103 15 0;<br />
#P inlet 242 103 15 0;<br />
#P outlet 50 154 15 0;<br />
#P connect 4 0 6 0;<br />
#P connect 6 0 0 0;<br />
#P connect 6 1 7 0;<br />
#P connect 7 0 5 0;<br />
#P fasten 8 0 5 0 223 96 271 96 271 144 139 144;<br />
#P connect 3 0 7 1;<br />
#P connect 2 0 7 2;<br />
#P connect 6 2 8 0;<br />
#P connect 1 0 7 3;<br />
#P pop;<br />
#P newobj 278 498 59 196617 p translate;<br />
#P flonum 368 473 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 331 473 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 295 473 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 353 424 632 196622 matrixmode + rotate (XYZ , one for  <br />
each axis , could do one angle/axis pair , if preferred);<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#N vpatcher 30 89 689 495;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P newex 134 183 117 196617 pack glrotate 0. 1. 0. 0.;<br />
#P inlet 160 127 15 0;<br />
#P newex 295 180 117 196617 pack glrotate 0. 0. 1. 0.;<br />
#P inlet 321 124 15 0;<br />
#P message 386 79 123 196617 glmatrixmode modelview;<br />
#P newex 451 179 117 196617 pack glrotate 0. 0. 0. 1.;<br />
#P newex 50 50 347 196617 t b b b b b;<br />
#P newex 134 243 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P inlet 50 30 15 0;<br />
#P inlet 477 123 15 0;<br />
#P outlet 50 154 15 0;<br />
#P connect 2 0 4 0;<br />
#P connect 4 0 0 0;<br />
#P connect 4 3 10 0;<br />
#P connect 10 0 3 0;<br />
#P fasten 6 0 3 0 391 103 628 103 628 197;<br />
#P connect 5 0 3 0;<br />
#P connect 8 0 3 0;<br />
#P connect 9 0 10 1;<br />
#P connect 4 2 8 0;<br />
#P connect 7 0 8 1;<br />
#P connect 4 4 6 0;<br />
#P connect 4 1 5 0;<br />
#P connect 1 0 5 1;<br />
#P pop;<br />
#P newobj 278 421 63 196617 p rotatexyz;<br />
#P flonum 368 396 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 331 396 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 295 396 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 353 611 364 196622 drawraw!!!;<br />
#P comment 353 317 364 196622 matrixmode + translate;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#N vpatcher 30 89 630 489;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P newex 66 88 66 196617 t b drawraw;<br />
#P newex 122 147 238 196617 jit.gl.gridshape v001 @automatic 0 @shape  <br />
sphere;<br />
#P outlet 66 221 15 0;<br />
#P inlet 66 55 15 0;<br />
#P connect 0 0 3 0;<br />
#P connect 3 0 1 0;<br />
#P connect 3 1 2 0;<br />
#P pop;<br />
#P newobj 278 611 48 196617 p shpere;<br />
#N vpatcher 30 89 630 489;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P message 218 76 123 196617 glmatrixmode modelview;<br />
#P newex 134 123 118 196617 pack gltranslate 0. 0. 0.;<br />
#P newex 50 50 179 196617 t b b b;<br />
#P newex 134 151 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P inlet 50 30 15 0;<br />
#P inlet 170 103 15 0;<br />
#P inlet 206 103 15 0;<br />
#P inlet 242 103 15 0;<br />
#P outlet 50 154 15 0;<br />
#P connect 4 0 6 0;<br />
#P connect 6 0 0 0;<br />
#P connect 6 1 7 0;<br />
#P fasten 8 0 5 0 223 96 271 96 271 144 139 144;<br />
#P connect 7 0 5 0;<br />
#P connect 3 0 7 1;<br />
#P connect 2 0 7 2;<br />
#P connect 6 2 8 0;<br />
#P connect 1 0 7 3;<br />
#P pop;<br />
#P newobj 278 311 59 196617 p translate;<br />
#P flonum 368 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 331 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 295 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#N vpatcher 30 89 630 489;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 0;<br />
#P message 15 187 184 196617 glmatrixmode modelview , glpopmatrix;<br />
#P newex 40 125 40 196617 t b b b;<br />
#P window linecount 1;<br />
#P message 205 187 189 196617 glmatrixmode modelview , glpushmatrix;<br />
#P newex 147 247 221 196617 jit.gl.sketch v001 @automatic 0  <br />
@immediate 1;<br />
#P outlet 55 271 15 0;<br />
#P inlet 40 98 15 0;<br />
#P connect 4 0 5 0;<br />
#P connect 0 0 4 0;<br />
#P connect 4 1 1 0;<br />
#P connect 5 0 2 0;<br />
#P connect 3 0 2 0;<br />
#P connect 4 2 3 0;<br />
#P pop;<br />
#P newobj 278 258 32 196617 p top;<br />
#P newex 277 661 157 196617 jit.window v001 @depthbuffer 1;<br />
#P user jit.fpsgui 77 337 60 196617 0;<br />
#P toggle 82 58 15 0;<br />
#P newex 82 84 51 196617 qmetro 2;<br />
#P newex 82 122 58 196617 t b b erase;<br />
#P newex 78 298 179 196617 jit.gl.render v001 @lighting_enable 1;<br />
#P window setfont &#8220;Sans Serif&#8221; 14.;<br />
#P comment 353 259 570 196622 matrixmode + push + pop on completion!!!;<br />
#P window linecount 3;<br />
#P comment 190 57 635 196622 &#8211; use modelview matrix for modelview  <br />
transforms ; &#8211; push/pop matrix before/after bang chain ; &#8211; to draw  <br />
objects , need to use &#8220;drawraw&#8221; message , otherwise other state is  <br />
reset;<br />
#P fasten 32 2 33 0 826 244 808 310 334 352;<br />
#P connect 38 0 21 0;<br />
#P connect 38 0 22 0;<br />
#P connect 38 0 23 0;<br />
#P connect 37 0 26 0;<br />
#P connect 37 0 27 0;<br />
#P connect 37 0 28 0;<br />
#P connect 34 0 33 1;<br />
#P connect 18 0 19 3;<br />
#P connect 23 0 24 3;<br />
#P connect 11 0 12 3;<br />
#P connect 28 0 29 3;<br />
#P connect 17 0 19 2;<br />
#P connect 35 1 32 0;<br />
#P connect 3 1 35 1;<br />
#P connect 22 0 24 2;<br />
#P connect 10 0 12 2;<br />
#P connect 27 0 29 2;<br />
#P connect 16 0 19 1;<br />
#P connect 33 0 16 0;<br />
#P connect 21 0 24 1;<br />
#P connect 9 0 12 1;<br />
#P connect 26 0 29 1;<br />
#P connect 29 0 13 0;<br />
#P connect 24 0 29 0;<br />
#P connect 19 0 24 0;<br />
#P connect 12 0 19 0;<br />
#P connect 8 0 12 0;<br />
#P connect 35 0 8 0;<br />
#P connect 32 0 8 0;<br />
#P connect 3 0 2 0;<br />
#P connect 3 2 2 0;<br />
#P connect 2 0 6 0;<br />
#P connect 4 0 3 0;<br />
#P connect 5 0 4 0;<br />
#P window clipboard copycount 39;</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113146</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113146</link>
					<pubDate>Wed, 26 Sep 2007 21:48:04 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>
p.s. jit.gl.mesh will be *oodles* faster for cases like the one Yair  <br />
was actually interested in, and AB&#8217;s solution would be recommended.  <br />
If using the geometry many times in the sort of iterative  <br />
jit.gl.gridshape case, use @displaylist 1, for performance improvements.</p>
<p>-Joshua</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113147</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113147</link>
					<pubDate>Tue, 06 May 2008 09:33:40 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>revisited the formulas, added rotation origin math and visualization</p>
<p>#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 1;<br />
#P comment 288 430 112 9109513 visualize roatation center;<br />
#P newex 199 415 70 9109513 vexpr $f1* &#8211; 1.;<br />
#P message 199 437 79 9109513 position $1 $2 $3;<br />
#P window linecount 2;<br />
#P newex 199 456 156 9109513 jit.gl.gridshape rott @shape circle @scale 0.1<br />
0.1 0.1 @color 1 0 0 1;<br />
#P flonum 158 214 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 120 214 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 84 214 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P window linecount 1;<br />
#P newex 84 231 88 9109513 pak 0. 0. 0.;<br />
#P newex 26 253 58 9109513 jit.op @op +;<br />
#P newex 26 441 68 9109513 jit.op @op -;<br />
#P message 495 169 29 9109513 reset;<br />
#B color 5;<br />
#P newex 496 189 22 9109513 t 0;<br />
#P flonum 460 353 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 460 313 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P flonum 454 259 35 9 0 0 0 139 0 0 0 255 227 23 222 222 222 0 0 0;<br />
#P newex 26 371 469 9109513 jit.expr @expr in[0]<br />
&#8220;in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])&#8221;<br />
&#8220;in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 26 331 469 9109513 jit.expr @expr<br />
&#8220;in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])&#8221; in[0]<br />
&#8220;in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])&#8221; in[0] in[0];<br />
#P newex 26 278 463 9109513 jit.expr @expr &#8220;in[0].p[0]*cos(in[1]) -<br />
in[0].p[1]*sin(in[1])&#8221; &#8220;in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])&#8221; in[0]<br />
in[0];- Show quoted text -</p>
<p>#N vpatcher 15 55 281 431;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 0;<br />
#P newex 144 280 27 9109513 * -1.;<br />
#P window linecount 3;<br />
#P comment 198 315 23 9109513 min scale;<br />
#P window linecount 1;<br />
#P comment 82 302 58 9109513 max scale;<br />
#P newex 41 204 27 9109513 * 1.;<br />
#P window setfont &#8220;Sans Serif&#8221; 12.;<br />
#P number 57 182 35 12 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P newex 41 156 57 9109513 t f f;<br />
#P newex 41 279 27 9109513 &#8211; 0.;<br />
#P message 41 325 59 9109513 0.8284;<br />
#B color 4;<br />
#P message 41 304 34 9109513 set $1;<br />
#P newex 27 29 54 9109513 delay 1000;<br />
#P newex 83 27 23 9109513 r fs;<br />
#P newex 172 182 50 9109513 / 2.;<br />
#P message 172 226 50 9109513 0.8284;<br />
#P message 172 205 50 9109513 set $1;<br />
#P newex 88 211 27 9109513 / 2.;<br />
#P message 144 324 46 9109513 -0.8284;<br />
#B color 4;<br />
#P message 144 303 34 9109513 set $1;<br />
#P newex 106 89 64 9109513 r fromRender;<br />
#P window linecount 2;<br />
#P comment 125 56 100 9109513 2. Calculate width and height in GL;<br />
#P window linecount 1;<br />
#P comment 181 140 35 9109513 height;<br />
#P flonum 106 156 59 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P flonum 172 156 59 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;<br />
#P window linecount 3;<br />
#P message 27 50 72 9109513 getdest_dim , getcamera , getlens_angle;<br />
#P window linecount 1;<br />
#N vpatcher 385 97 759 364;<br />
#P outlet 131 150 15 0;<br />
#P window setfont &#8220;Sans Serif&#8221; 9.;<br />
#P window linecount 0;<br />
#P newex 131 128 29 9109513 * 1.;<br />
#P window linecount 1;<br />
#P message 270 77 20 9109513 $2;<br />
#P message 248 77 20 9109513 $1;<br />
#P newex 248 95 32 9109513 / 1.;<br />
#P message 102 70 20 9109513 $3;<br />
#P newex 50 92 184 9109513 expr $f2*2*tan($f1/2*3.1415/180);<br />
#P newex 50 50 164 9109513 route lens_angle camera dest_dim;<br />
#P inlet 50 30 15 0;<br />
#P outlet 166 152 15 0;<br />
#P connect 1 0 2 0;<br />
#P connect 2 0 3 0;<br />
#P connect 2 1 4 0;<br />
#P fasten 3 0 8 0 55 115 136 115;<br />
#P connect 8 0 9 0;<br />
#P fasten 5 0 8 1 253 118 155 118;<br />
#P fasten 3 0 0 0 55 115 171 115;<br />
#P fasten 4 0 3 1 107 88 229 88;<br />
#P fasten 2 2 6 0 157 73 253 73;<br />
#P connect 6 0 5 0;<br />
#P fasten 2 2 7 0 157 73 275 73;<br />
#P connect 7 0 5 1;<br />
#P pop;<br />
#P newobj 106 112 76 9109513 p CalcGLHeight;<br />
#P comment 113 140 35 9109513 width;<br />
#P newex 27 101 42 9109513 s render;<br />
#P connect 15 0 16 0;<br />
#P connect 16 0 3 0;<br />
#P fasten 3 0 0 0 32 97 32 97;<br />
#P fasten 2 0 20 0 111 137 46 137;<br />
#P connect 20 0 22 0;<br />
#P connect 22 0 19 0;<br />
#P connect 19 0 17 0;<br />
#P connect 17 0 18 0;<br />
#P connect 21 0 22 1;<br />
#P fasten 11 0 19 1 93 254 63 254;<br />
#P connect 20 1 11 0;<br />
#P connect 8 0 2 0;<br />
#P fasten 2 0 5 0 111 135 111 135;<br />
#P fasten 11 0 25 0 93 254 149 254;<br />
#P connect 25 0 9 0;<br />
#P connect 9 0 10 0;<br />
#P fasten 2 1 4 0 177 135 177 135;<br />
#P fasten 4 0 14 0 177 176 177 176;<br />
#P connect 14 0 12 0;<br />
#P connect 12 0 13 0;<br />
#P pop;<br />
#P newobj 142 84 44 9109513 p glwidth;<br />
#P user jit.pwindow 261 26 162 122 0 0 0 0 1 0;<br />
#X name rott;<br />
#P objectname rott;<br />
#P toggle 23 32 33 0;<br />
#P newex 23 74 57 9109513 qmetro 33;<br />
#P newex 26 469 142 9109513 jit.gl.mesh rott @poly_mode 1 1;<br />
#P newex 23 96 53 9109513 t b b erase;<br />
#P newex 26 175 164 9109513 jit.matrix data 3 float32 2 2 <a href='http://cycling74.com/forums/users/adapt/' rel='nofollow' class='bbp-mention-link adapt'>@adapt</a> 0;<br />
#P newex 26 152 306 9109513 jit.gl.gridshape @automatic 0 @dim 2 2<br />
@matrixoutput 1 @shape plane;<br />
#P newex 23 125 138 9109513 jit.gl.render rott @camera 0 0 4;<br />
#P window linecount 2;<br />
#P comment 134 45 100 9109513 how to roatte a mesh based quad;<br />
#P window linecount 1;<br />
#P comment 195 214 100 9109513 change rotation center;<br />
#P connect 8 0 7 0;<br />
#P connect 7 0 5 0;<br />
#P fasten 5 2 2 0 70 119 28 119;<br />
#P connect 5 0 2 0;<br />
#P fasten 5 1 3 0 49 147 31 147;<br />
#P connect 3 0 4 0;<br />
#P connect 4 0 20 0;<br />
#P connect 20 0 11 0;<br />
#P connect 11 0 12 0;<br />
#P connect 12 0 13 0;<br />
#P connect 13 0 19 0;<br />
#P connect 19 0 6 0;<br />
#P fasten 21 0 20 1 89 251 79 251;<br />
#P hidden fasten 17 0 22 0 501 213 89 213;<br />
#P connect 22 0 21 0;<br />
#P connect 21 0 19 1;<br />
#P hidden fasten 17 0 23 0 501 213 125 213;<br />
#P connect 23 0 21 1;<br />
#P hidden fasten 17 0 24 0 501 213 163 213;<br />
#P connect 24 0 21 2;<br />
#P fasten 21 0 27 0 89 251 204 251;<br />
#P connect 27 0 26 0;<br />
#P connect 26 0 25 0;<br />
#P hidden fasten 17 0 14 0 501 254 459 254;<br />
#P hidden fasten 17 0 15 0 501 306 465 306;<br />
#P hidden fasten 17 0 16 0 501 351 465 351;<br />
#P fasten 14 0 11 1 459 276 484 276;<br />
#P fasten 15 0 12 1 465 329 490 329;<br />
#P fasten 16 0 13 1 465 369 490 369;<br />
#P connect 18 0 17 0;<br />
#P window clipboard copycount 29;</p>
<p>
On Thu, Sep 27, 2007 at 12:48 AM, Joshua Kit Clayton <jkc @musork.com> wrote:</jkc></p>
<p>><br />
><br />
> p.s. jit.gl.mesh will be *oodles* faster for cases like the one Yair was<br />
> actually interested in, and AB&#8217;s solution would be recommended. If using the<br />
> geometry many times in the sort of iterative jit.gl.gridshape case, use<br />
> @displaylist 1, for performance improvements.<br />
><br />
><br />
></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113148</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113148</link>
					<pubDate>Wed, 07 May 2008 09:33:34 +0000</pubDate>
					<dc:creator>justin</dc:creator>

					<description>
						<![CDATA[
						<p>Quote: yair r. wrote on Tue, 06 May 2008 10:33<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
> revisited the formulas, added rotation origin math and visualization</p>
<p>interested in seeing the patch, but there seems to be some problems with copy + paste&#8230; perhaps some forum patch scrambling?</p>
<p>thanks,</p>
<p>j</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113149</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113149</link>
					<pubDate>Wed, 07 May 2008 09:45:22 +0000</pubDate>
					<dc:creator>yair reshef</dc:creator>

					<description>
						<![CDATA[
						<p>here ya go</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113150</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113150</link>
					<pubDate>Mon, 12 May 2008 15:12:36 +0000</pubDate>
					<dc:creator>justin</dc:creator>

					<description>
						<![CDATA[
						<p>thanks, but still cant open&#8230;. is it done in max v5?<br />
am going to update sometime this summer, still have projects i need to finish!</p>
<p>j</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113151</guid>
					<title><![CDATA[Re: how to rotate a quad, math pls]]></title>
					<link>http://cycling74.com/forums/topic/how-to-rotate-a-quad-math-pls/#post-113151</link>
					<pubDate>Sat, 01 May 2010 19:07:55 +0000</pubDate>
					<dc:creator>nnimar</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Yair,</p>
<p>Would you mind reposting your patch because there seems to be some problem with the copy / paste ?</p>
<p>cheers !</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

