XML Feeds

.

[jitter] atan2 and shortest path to point

yair reshef yair99 at gmail.com
Mon Oct 22 08:31:09 MDT 2007


hi, math question. its hard to formulate as a question, here is a patch with
explanation.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 194 72 130 9109513 how to get the shortest path?;
#P comment 368 194 22 9109513 y x;
#P newex 172 21 45 9109513 loadbang;
#P message 172 127 55 9109513 texture grid;
#P newex 334 170 89 9109513 route screentoworld;
#P message 129 231 91 9109513 screentoworld \$1 \$2;
#P newex 129 207 74 9109513 route mouseidle;
#P newex 129 253 42 9109513 s render;
#P newex 334 215 163 9109513 expr ((atan2($f1 \\\, $f2))/3.1415)*180.;
#P objectname receive[4];
#P newex 283 233 27 9109513 t b b;
#P newex 283 209 33 9109513 r draw;
#P newex 300 256 27 9109513 f 0.;
#P newex 300 278 59 9109513 slide 50. 50.;
#P flonum 334 240 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 371 240 44 9109513 degrees;
#P message 334 193 31 9109513 \$2 \$1;
#P message 300 303 82 9109513 rotatexyz 0. 0. \$1;
#P window linecount 2;
#P newex 283 328 210 9109513 jit.gl.gridshape rott @color 1 1 1 1 @shape
circle @texture grid @automatic 0;
#P window linecount 1;
#P newex 89 127 35 9109513 s draw;
#P newex 126 127 40 9109513 r render;
#N vpatcher 530 245 771 446;
#P origin 64 -4;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 51 84 40 9109513 sel 0 1;
#P message 51 128 152 9109513 border 1 \, size 320 240 \, pos 10 463;
#P message 66 107 160 9109513 border 0 \, size 1024 778 \, \, pos 1024 0;
#P toggle 51 66 15 0;
#P window linecount 0;
#P newex 50 44 35 9109513 sel 27;
#P newex 50 21 40 9109513 key;
#P outlet 56 154 15 0;
#P fasten 1 0 2 0 55 42 55 42;
#P connect 2 0 3 0;
#P connect 3 0 6 0;
#P fasten 6 0 5 0 56 106 56 106;
#P connect 4 0 0 0;
#P connect 5 0 0 0;
#P connect 6 1 4 0;
#P pop;
#P newobj 26 148 25 9109513 p fs;
#P window linecount 2;
#P newex 26 170 178 9109513 jit.window rott @size 320 240 @floating 1 @pos
10 450 @idlemouse 1;
#P objectname jit.window;
#P window linecount 1;
#P newex 65 148 279 9109513 jit.gl.render rott @camera 0 0 3 @erase_color 0.
0. 0. 1.;
#P objectname jit.gl.render;
#P toggle 65 48 20 0;
#P objectname toggle;
#P newex 65 74 50 9109513 qmetro 20;
#P newex 65 96 58 9109513 t b b erase;
#P comment 194 53 315 9109513 when moving from top left to bottom right the
angle jumps a fulll rotation.;
#P connect 6 0 5 0;
#P fasten 24 0 3 0 177 44 70 44;
#P connect 3 0 2 0;
#P fasten 2 0 1 0 70 94 70 94;
#P fasten 23 0 4 0 177 147 70 147;
#P fasten 1 2 4 0 118 123 70 123;
#P connect 1 0 4 0;
#P fasten 7 0 4 0 131 147 70 147;
#P connect 1 1 8 0;
#P fasten 5 1 20 0 199 204 134 204;
#P connect 20 0 21 0;
#P connect 21 0 19 0;
#P connect 24 0 23 0;
#P connect 16 0 17 0;
#P fasten 10 0 9 0 305 323 288 323;
#P fasten 17 0 9 0 288 323 288 323;
#P connect 17 1 15 0;
#P connect 15 0 14 0;
#P fasten 14 0 10 0 305 300 305 300;
#P fasten 18 0 15 1 339 237 322 237;
#P connect 4 1 22 0;
#P fasten 22 0 11 0 339 196 339 196;
#P connect 11 0 18 0;
#P connect 18 0 13 0;
#P window clipboard copycount 27;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cycling74.com/pipermail/jitter/attachments/20071022/80a98e19/attachment.htm


More information about the jitter mailing list