1
$\begingroup$

Suppose instead of using Cartesian coordinate $\vec{x}=(1, 0)$ and $\vec{y}=(0, 1)$, I want to define new coordiates $\vec{a} = (1,0)$ and $\vec{b} = (\frac{1}{2},\frac{\sqrt{3}}{2} )$. And when I plot a function for example $f(\vec{r}) = f(c, d)$

f[c_, d_] := d

Plot3D[f[c, d], {c, 0, 1}, {d, 0, 1}]

Is there a way it will interpret the plotting region and function as $d*\vec{b}$ instead of $d*\vec{y}$?

I know I can probably redefine the new unit vectors $\vec{a}$ and $\vec{b}$ as Cartesian coordinate but it would be convenient if I can redefine the coordinate system.

I hope I'm clear enough what I'm trying to do and thanks in advnace!

$\endgroup$
  • 2
    $\begingroup$ maybe f2 = Rescale[f[##], {0, 1}, {1, Sqrt[3]}/2] &;Plot3D[f2[c, d], {c, 0, 1}, {d, 0, 1}]? $\endgroup$ – kglr Jun 9 at 1:34
1
$\begingroup$
ClearAll[f]
f[c_, d_] := d

p1 = Plot3D[f[c, d], {c, 0, 1}, {d, 0, 1}, ImageSize -> 300];

f2 = Rescale[f[##], {0, 1}, {1, Sqrt[3]}/2] &;

p2 = Plot3D[ f2[c, d], {c, 0, 1}, {d, 0, 1}, ImageSize -> 300];

Row[{p1, p2}, Spacer[5]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.