Test the polarPath proposal

Center Approximated Path

Path to be approximated: P 0,-100 N300,90 0,270 300,450

Approximation of the path:

? M0,200 C-52.36,183.33 -95.55,152.76 -125,116.51 S -170.19,38.56 -173.21,0 -166.67,-73.82 -150,-100 -109.76,-143.22 -86.6,-150 -40.89,-153.37 -25,-143.3 -0,-116.67 0,-100 C-0,-116.67 9.11,-133.23 25,-143.3 S 63.44,-156.78 86.6,-150 133.33,-126.18 150,-100 176.22,-38.56 173.21,-0 154.45,80.26 125,116.51 52.36,183.33 0,200

Only numbers without units are allowed.
Commands to be used are: F,f,G,g,I,i,J,j,K,k,N,n,P,p,R,r
Note that currently the error handling used in this script does not really help to find errors in the path notation - take care yourself! The script 'eats' almost every input and converts it into some valid path. For example not specified commands will be interpreted as numbers as PHP interpretes this - this will result typically in a '0'. If a command is followed by a wrong amount of numbers, the superfluous numbers are skipped respectively if not enough numbers are present, the command itself is skipped.
This error handling would not be very helpful as a real SVG implementation, but it avoids, that this page can be completely corrupted with an invalid input.

polarPath:
d

accuracy (digits for rounding, only for the approximation relevant, 0-10)

Just to adjust:
viewBox left

viewBox top

viewBox width

viewBox height

fill (only valid values!)
fill-opacity (0-1):

fill-rule:
selected nonzero:
nonzero:
evenodd:
stroke (only valid values!)

background-color (only valid values!)

stroke-width (number):
stroke-opacity (0-1):
stroke-miterlimit (number):

stroke-linejoin:
selected miter:
miter:
butt:
round:
stroke-linecap:
selected round:
round:
butt:
square:
Painting:

Examples:

Circle segments:
P0,0N0,30 300,30 300,60 0,60 0,150 200,150 200,300 0,300 0,320 100,320 100,360 0,360

Circle segments, relative coordinates:
p0,0n0,30 i300,0 i0,30 i-300,0 i0,90 i200,0 i0,150 i-200,0 i0,20 i100,0 i0,40 i-100,0

Symmetrical spiral object:
P0,0N0,0 I300,72 N0,72 I300,144 N0,144 I300,216 N0,216 I300,288 N0,288 I300,360

Another symmetrical spiral object (circular saw):
P0,0N0,0 I300,72R1 N0,72 I300,144R1 N0,144 I300,216R1 N0,216 I300,288R1 N0,288 I300,360R1

Some tricky simple spiral:
P0,0N300,0 0,720 -300,0R0 0 1

Some tricky simple spiral:
P0,0N300,0 0,720 -300,0R0 0 0 1

Star or blossom like object:
P 0,0 N300,0 I-300,36 300,72 -300,108, 300,144 -300,180R0 0 -1

Star like quadratic object:
P 0,0 N300,0 J -200,36 300,72 -200,108 300,144 -200,180 300,216 -200,252 300,288 -200,324 300,360R-1

Fermats spiral:
P0,0N0,0 J150,0 300 3600

Spiral with quadratic r dependence:
P0,0N0,0 J0,1800 300 3600

Simple quadratic object:
P0,0N0,0 J300,60 0,72 N0,72 J500,132 0,144 N0,144 J600,204 0,216 N0,216 J400,276 0,288 N0,288 J700,348 0,360

Simple quadratic object with relative coordinates:
P0,0 n300,0 j-120,-30 -200,72f -100,-12 n300,0 j-90,-30 -240,72f -60,-12 n300,0 j-120,-30 -200,72f -100,-12 n300,0 j-90,-30 -240,72f -60,-12 n300,0 j-120,-30 -200,72f -100,-12 n300,0 j-90,-30 -240,72f -60,-12

Blossom like cubic object:
P 0,0 N300,0 K -300,90 -100,80 -300,90 300,180 100,170 300,180 -300,270 -100,260 -300,270 300,360 100,350 300,360R-1

Simple cubic object:
P0,0N0,0 K500-60 500 60 0,0 100-20 100,140 0,120 500,60 500,180 0,120 100,100 100,260 0,240 500,180 500,300 0,240 100,220 100,380 0,360

Logarithmic spiral approximation with cubic path fragments:
P0,0 N400,0 K272,80 202.17,160 153.16,240 G77.41,400 58.64,480 29.64,640 22.45,720

Light polarisation dependence; r = I*(1+k*cos(2*(φ - φ0)), k=0.9, φ0= 60 degrees:
P0,0 N110,0 K 164.41,10 235.59,20 290,30 G380,50 380,60 344.41,80 290,90 164.41,110 110,120 20,140 20,150 55.59,170 110,180 235.59,200 290,210 380,230 380,240 344.41,260 290,270 164.41,290 110,300 20,320 20,330 55.59,350 110,360 R-1

Ellipse r = p/(1+e*cos(φ - φ0)), p=150, φ0= 60 degrees:
P0,0 N120,0 K 112.74,10 107.86,20 104.67,30 G100,50 100,60 101.49,80 104.67,90 112.74,110 120,120 136.91,140 150,150 179.85,170 200,180 244.2,200 264.56,210 300,230 300,240 284.92,260 264.56,270 220.15,290 200,300 163.09,320 150,330 127.26,350 120,360 R-1

Ellipse (focus point parametrisation) r = p/(1+e*cos(φ - φ0)), p=150, φ0= -30 degrees, relative coordinates:
P0,0 N104.67,0 k 3.19,10 8.07,20 15.33,30 g16.91,20 30,30 59.85,50 80,60 124.2,80 144.56,90 180,110 180,120 164.92,140 144.56,150 100.15,170 80,180 43.09,200 30,210 7.26,230 0,240 -12.14,260 -15.33,270 -20,290 -20,300 -18.51,320 -15.33,330 r-1

Rough 3/2 Ellipse (center point) approximation:
P 0,0 N300,0 K 300,22.5 200,45 200,90 200,135 300,157.5 300,180 300,202.5 200,225 200,270 200,315 300,337.5 300,360R-1