|
|
8 0 7.82518 1.03956 7.30836 2.03368 6.47214 2.93892 5.35305 3.71572 4.00001 4.33012 2.47214 4.75528 0.836238 4.97261 -0.836216 4.97261 -2.47212 4.75529 -3.99999 4.33013 -5.35303 3.71573 -6.47213 2.93893 -7.30836 2.03369 -7.82518 1.03957 -8 1.32679e-005 -7.82519 -1.03954 -7.30837 -2.03367 -6.47215 -2.93891 -5.35306 -3.71571 -4.00002 -4.33012 -2.47216 -4.75528 -0.836259 -4.97261 0.836195 -4.97261 2.4721 -4.75529 3.99997 -4.33014 5.35302 -3.71574 6.47211 -2.93895 7.30835 -2.03371 7.82517 -1.03958 |
8.000000 0.000000 1.000000 -0.000003 7.750000 0.000001 7.825180 1.039560 0.948283 0.317427 7.588109 0.960203 7.308360 2.033680 0.818154 0.575000 7.103822 1.889930 6.472140 2.938920 0.656293 0.754506 6.308067 2.750293 5.353050 3.715720 0.493852 0.869546 5.229587 3.498333 4.000010 4.330120 0.341795 0.939775 3.914561 4.095176 2.472140 4.755280 0.200375 0.979719 2.422046 4.510350 0.836238 4.972610 0.065990 0.997820 0.819740 4.723155 -0.836216 4.972610 -0.065987 0.997820 -0.819719 4.723155 -2.472120 4.755290 -0.200372 0.979720 -2.422027 4.510360 -3.999990 4.330130 -0.341795 0.939775 -3.914541 4.095186 -5.353030 3.715730 -0.493850 0.869547 -5.229567 3.498343 -6.472130 2.938930 -0.656289 0.754509 -6.308058 2.750303 -7.308360 2.033690 -0.818152 0.575002 -7.103822 1.889939 -7.825180 1.039570 -0.948282 0.317428 -7.588109 0.960213 -8.000000 0.000013 -1.000000 0.000004 -7.750000 0.000012 -7.825190 -1.039540 -0.948285 -0.317422 -7.588119 -0.960185 -7.308370 -2.033670 -0.818155 -0.574998 -7.103831 -1.889920 -6.472150 -2.938910 -0.656293 -0.754506 -6.308077 -2.750283 -5.353060 -3.715710 -0.493855 -0.869545 -5.229596 -3.498324 -4.000020 -4.330120 -0.341799 -0.939773 -3.914570 -4.095177 -2.472160 -4.755280 -0.200375 -0.979719 -2.422066 -4.510350 -0.836259 -4.972610 -0.065990 -0.997820 -0.819761 -4.723155 0.836195 -4.972610 0.065987 -0.997820 0.819698 -4.723155 2.472100 -4.755290 0.200368 -0.979721 2.422008 -4.510360 3.999970 -4.330140 0.341791 -0.939776 3.914522 -4.095196 5.353020 -3.715740 0.493848 -0.869548 5.229558 -3.498353 6.472110 -2.938950 0.656286 -0.754512 6.308038 -2.750322 7.308350 -2.033710 0.818151 -0.575003 7.103812 -1.889959 7.825170 -1.039580 0.948282 -0.317428 7.588099 -0.960223 |
Pt2d nvec = { tangent.y, -tangent.x };
normal[i] = nvec / abs( nvec );
constraint[i] = boundary[i] - d * normal[i];
"Note that, depending on the size of the object one may want to scale the normal vectors when plotting them (as otherwise they may either be much larger than the object concerned, or too small to see)." |
how did you effectively plot them beautifully using gnuplot? |
p "output.txt" u 1:2 w p, "output.txt" u 5:6 w p, "output.txt" u 1:2:3:4 w vec |
Will finding the unit vectors (as also included in your program) not solve this issue so as to avoid scalings of normal vectors? |
p "output.txt" u 1:2 w p, "output.txt" u 1:2:(-0.05*$3):(-0.05*$4) w vec |
anticlockwise = false;
or, as I have done here, scale the plotted normal vectors by -0.05, rather than +0.05. One of your vertices also appears to be wrong. You can see this by plotting the boundary with lines rather than points:p "output.txt" u 1:2 w l, "output.txt" u 1:2:(-0.05*$3):(-0.05*$4) w vec |
The exact same technique works |