hi, dear list ! i'm stuck on this:
i want to translate an image onto a quad-like surface with arbitrary points, just like MAX's [jit.gl.cornerpin] object or the "distort" translation in photoshop.
the only result on my research was to use the [polygon] object instead of [square]. while that comes pretty close to what i am looking for, i can't ssem to make it work without a prespective distortion.
i tried several settings, but didn't really succeed in getting an orthographic distortion without "folding artifacts" (please see attached patch that explains my problem. the simple task is here to create a trapezoid instead of a square - but as i said the points should be freely adjustable with true perspective skew)
please excuse my incredibly limited knowledge on geometrics, my wording is probably totally wrong here i guess what i'm looking for is something like a 2-dimensional [polygon]. thanks for any hints best oliver -- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /////////////// http://pendler.klingt.org ////////////// \\\\\\\\\\\\\\\ http://oliver.klingt.org \\\\\\\\\\\\\\ ////////////////////////////////////////////////////////
#N canvas 767 50 639 362 10; #X declare -stdlib Gem; #X obj 178 10 declare -stdlib Gem; #X obj 180 58 gemhead; #X obj 10 9 cnv 15 150 70 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 50 454 304 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 182 68 set create; #X msg 132 112 create \, 1; #X msg 238 112 destroy; #N canvas 87 154 247 179 Gem.init 0; #X obj 118 46 loadbang; #X msg 118 81 reset; #X obj 118 113 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X restore 289 80 pd Gem.init; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X connect 8 0 0 0; #X restore 15 53 pd gemwin; #X msg 15 29 destroy; #X text 11 9 Create window and render; #X obj 179 244 pix_texture; #X msg 14 139 draw line; #X msg 14 94 draw fill; #X msg 14 116 draw point; #X msg 14 159 draw linestrip; #X msg 14 179 draw tri; #X msg 14 201 draw tristrip; #X msg 14 224 draw trifan; #X msg 14 285 draw quad; #X msg 14 307 draw quadstrip; #X obj 14 330 s \$0-p; #X obj 132 301 r \$0-p; #X obj 356 182 list split 3; #X obj 390 205 list split 3; #X obj 424 229 list split 3; #X obj 193 301 r \$0-p1; #X obj 243 301 r \$0-p2; #X obj 294 301 r \$0-p3; #X obj 344 301 r \$0-p4; #X obj 356 260 s \$0-p1; #X obj 407 260 s \$0-p2; #X obj 458 260 s \$0-p3; #X obj 509 260 s \$0-p4; #X text 534 119 square; #X obj 273 60 loadbang; #X obj 179 218 pix_image raster.jpg; #X obj 355 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 50 450 300 openpanel 0; #X obj 114 62 inlet; #X obj 121 254 outlet; #X obj 114 125 openpanel; #X msg 114 162 set open \$1; #X obj 114 199 t b a; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 4 1 1 0; #X restore 355 32 pd openpanel; #X msg 355 56 open D:/bilders/ich presse/oliver_2011.jpg; #X msg 356 119 -2 -2 0 2 -2 0 2 2 0 -2 2 0; #X msg 380 145 -2 -2 0 2 -2 0 1 2 0 -1 2 0; #X msg 219 189 open raster.jpg; #X text 554 145 trapezoid ?; #X obj 179 331 polygon 4, f 24; #X text 384 97 TRY THOSE LISTS:; #X connect 1 0 31 0; #X connect 3 0 4 0; #X connect 4 0 3 0; #X connect 6 0 39 0; #X connect 7 0 16 0; #X connect 8 0 16 0; #X connect 9 0 16 0; #X connect 10 0 16 0; #X connect 11 0 16 0; #X connect 12 0 16 0; #X connect 13 0 16 0; #X connect 14 0 16 0; #X connect 15 0 16 0; #X connect 17 0 39 0; #X connect 18 0 25 0; #X connect 18 1 19 0; #X connect 19 0 26 0; #X connect 19 1 20 0; #X connect 20 0 27 0; #X connect 20 1 28 0; #X connect 21 0 39 1; #X connect 22 0 39 2; #X connect 23 0 39 3; #X connect 24 0 39 4; #X connect 30 0 14 0; #X connect 30 0 35 0; #X connect 31 0 6 0; #X connect 32 0 33 0; #X connect 33 0 34 0; #X connect 34 0 31 0; #X connect 35 0 18 0; #X connect 36 0 18 0; #X connect 37 0 31 0;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
