[jit.map] – strange behavior

Jan 15, 2009 at 9:31am

[jit.map] – strange behavior

Hello!

I generate aleatory values with [jit.noise 3 float32 x]
Then I [jit.iter] the values like this:

plane 0 = x
plane 1 = y
plane 2 = radius

allowing an area, a “carpet” of circles (sketch).

– What I want is to limit the radius to 0.5 -

So I’m using
[jit.unpack 2 @jump 2 1] -> [jit.map @map 0. 1. -1. 1.] for planes 0 & 1
and another [jit.map @map 0. 1. ] for plane 2

- Here’s the problem -

It seems values for plane 2 (radius) is depending on plane 1 (y)!

Yes, if plane 1 is higher then plane 2 is higher, if plane 1 is smaller then plane 2 is smaller,

This result in a non-uniform area of circle, where big ones are in the upper zone and little circles in the lower zone.

What is the hic ?

I just want to have a uniform carpet of circle with varied radius.

I tryed different mapping, without success.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 269 446 14 196617 y;
#P comment 136 444 14 196617 x;
#P newex 127 423 278 196617 unpack 0. 0. 0.;
#P comment 406 444 48 196617 ;
#P newex 144 527 62 196617 prepend set;
#P newex 127 502 27 196617 t b l;
#P newex 127 481 278 196617 sprintf moveto %f %f 0. \, circle %f;
#P window setfont “Sans Serif” 14.;
#P message 458 494 48 196622 reset;
#P window setfont “Sans Serif” 9.;
#P newex 127 376 341 196617 t l b;
#P comment 171 399 253 196617 scinde la matrice en 16 (dim) listes de 3 valeurs;
#P newex 127 397 41 196617 jit.iter;
#P message 144 553 457 196617 moveto -0.978134 0.978798 0. , circle 0.494699;
#P newex 225 608 53 196617 s 2sketch;
#B color 5;
#P newex 179 214 128 196617 jit.map @map 0. 1. 0. 0.5;
#P newex 127 241 104 196617 jit.pack 2 @jump 2 1;
#P newex 127 168 114 196617 jit.unpack 2 @jump 2 1;
#P message 219 282 47 196617 plane -1;
#P user jit.cellblock 190 304 726 348 3 9 4 1 128 17 0 1 1 0 0 0 1 1 1 0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 2 0 0 0;
#P newex 127 192 124 196617 jit.map @map 0. 1. -1. 1.;
#P number 163 102 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 163 120 41 196617 dim $1;
#P button 127 100 20 6;
#P newex 127 146 101 196617 jit.noise 3 float32 4;
#P fasten 11 0 10 0 149 593 230 593;
#P fasten 17 0 11 0 132 549 149 549;
#P connect 18 0 11 0;
#P connect 20 2 16 2;
#P connect 20 0 16 0;
#P connect 20 1 16 1;
#P connect 16 0 17 0;
#P connect 12 0 20 0;
#P connect 8 0 14 0;
#P connect 8 0 5 0;
#P connect 14 0 12 0;
#P connect 17 1 18 0;
#P fasten 15 0 10 0 463 592 230 592;
#P connect 14 1 15 0;
#P connect 6 0 5 0;
#P connect 3 0 2 0;
#P connect 4 0 8 0;
#P connect 7 0 4 0;
#P fasten 2 0 0 0 168 141 132 141;
#P connect 1 0 0 0;
#P connect 0 0 7 0;
#P connect 7 1 9 0;
#P fasten 9 0 8 1 184 234 226 234;
#P window clipboard copycount 23;

#41695
Jan 15, 2009 at 9:38am

I suppose there is no other solution?

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 293 104 101 196617 jit.noise 1 float32 2;
#P newex 293 148 136 196617 jit.map @map 0. 1. -0.2 0.2;
#P newex 161 193 104 196617 jit.pack 2 @jump 2 1;
#P newex 180 215 38 196617 r bang;
#B color 5;
#P newex 161 241 55 196617 jit.matrix;
#P newex 161 149 124 196617 jit.map @map 0. 1. -1. 1.;
#P number 197 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 197 77 41 196617 dim $1;
#P button 161 57 20 6;
#P newex 161 103 101 196617 jit.noise 2 float32 2;
#P connect 2 0 0 0;
#P connect 2 0 9 0;
#P connect 1 0 0 0;
#P fasten 1 0 9 0 166 95 298 95;
#P connect 3 0 2 0;
#P fasten 6 0 5 0 185 238 166 238;
#P connect 7 0 5 0;
#P connect 4 0 7 0;
#P connect 0 0 4 0;
#P connect 9 0 8 0;
#P fasten 8 0 7 1 298 186 260 186;
#P window clipboard copycount 10;

#148757
Jan 15, 2009 at 1:15pm

Hi,

Voici un example qui fait ce que tu veux, mais utilise jit.op et
quelques ops au lieu de jit.map.

– Pasted Max Patch, click to expand. –
#148758
Jan 15, 2009 at 2:38pm

Max5 ? aie!

#148759
Jan 15, 2009 at 3:09pm

#148760
Jan 15, 2009 at 4:29pm

Thank you JS.

#148761

You must be logged in to reply to this topic.