# Plot any parametrization (pure function, numbered variables)

I'd like to write a function plot[reg_,f_] that takes as input any product of intervals (list of pairs of reals) reg$$\subseteq\!\mathbb{R}^d$$ and a map/parametrization (pure function) $$f:D\longrightarrow\mathbb{R}^n$$, where $$n\!\in\!\{2,3\}$$ and $$1\!\leq\!d\!\leq\!n$$, and plot its trajectory. Examples of use:

plot[{{0,2Pi}},               {Cos[#],Sin[#]}&]                                  (*circle*)
plot[{{0,2Pi},{0,1}},         #2{Cos[#1],Sin[#1]}&]                              (*filled circle*)
plot[{{0,2},{0,1}},           {#1,#2}&]                                          (*filled rectangle*)
plot[{{0,2Pi}},               {Sin[#]+2Sin[2#],Cos[#]-2Cos[2#],-Sin[3#]}&];      (*trefoil knot*)
plot[{{0,2Pi},{0,2Pi}},       {(3+Cos[#1])Cos[#2],(3+Cos[#1])Sin[#2],Sin[#1]}&]; (*torus*)
plot[{{0,2Pi},{-Pi,Pi},{0,1}},#3{Cos[#1]Cos[#2],Cos[#1]Sin[#2],Sin[#1]}&];       (*filled sphere*)


While writing this question, I wanted to give my attempt at this problem. In the end, I solved it, so I am sharing it below, in hopes it helps someone else too.

plot[reg_,f_] := Module[{tr=Transpose,d=Length@reg,n=Length@f[[1]],v,o},