I want to draw the road which is similar to the following (but please ignore grass, soil, and the surrounding scenery for the sake of simplicity),

enter image description here

to illustrate a physics problem about circular motion. I have not tasted the power of pst-solides3d because of its lengthy documentation. My attempt is as follows but it looks not so good in 2D.

    \pscustom[fillstyle=solid,fillcolor=gray]{\pspolygon(-5,0)(-5,1)(-1,0)\scale{-1 1}\pspolygon(-5,0)(-5,1)(-1,0)}
    \pcline[linestyle=none](-5,1)(-1,0)\naput[nrot=:U,npos=.25,labelsep=-.5\pslinewidth]{\rput(.5,.5){\small car}\psframe(0,.25)(1,.75)\psline[linewidth=3pt](.25,0)(.25,.25)\psline[linewidth=3pt](.75,0)(.75,.25)}

enter image description here

I want to draw the complete circuit first and move the viewport such that it looks like the first image above. I believe your answer will help me to learn the rest easily.

  • The road is not a really a inclined circle, but part of a surface. Perhaps parts of a paraboloid will better fit your purposes. – user31729 Mar 10 '14 at 18:17
  • 2
    @StevenB.Segletes: Yes, I know about centripetal force also ;-) All I was writing was to state the form of road is not circular at all since it is a surface with curvature, not just a curve. – user31729 Mar 10 '14 at 18:33
  • 1
    @ChristianH. And I was writing merely to point out that a paraboloid would not mathematically suffice, except under perhaps extremely restricted conditions (e.g., step jump from zero to maximum road curvature). – Steven B. Segletes Mar 10 '14 at 18:35
  • 1
    @steven how I wish it was that simple :) my msc diploma would be 1 year earlier hehe. the cars cannot turn without sliding but I know what you mean. It is just my bad memories :D – percusse Mar 10 '14 at 19:46
  • 1
    @percusse Well, of COURSE I'm assuming the spherical automobile! Didn't I make that clear? ;^) – Steven B. Segletes Mar 10 '14 at 19:49

Well, here's a start. Using Jeff Hein's (quite brilliant) tikz-plot3d (suggested by your tag), I have built at least the outer and inner bounds of a racetrack (in magenta). All other elements you wish to include, as well as the viewing angle, may be implemented with this package (I think), and would probably provide a great familiarisation course in the package.

As a first step, I recommend playing around with the values in \tdplotsetmaincoords{80}{110} and observing the different viewing angles...




    \coordinate (O) at (0,0,0);
    \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
    \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
    \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
    \draw[-stealth, color=red] (O) -- (P);
    \draw[dashed, color=red] (O) -- (Pxy);
    \draw[dashed, color=red] (P) -- (Pxy);
        {\thetavec}{anchor=south west}{$\theta$}
    \draw[dashed,tdplot_rotated_coords] (\rvec,0,0) arc (0:90:\rvec);
    \draw[dashed] (\rvec,0,0) arc (0:90:\rvec);
    \draw[thick, color=magenta] (\rvec/2,0,0) arc (0:180:\rvec/2); % inner edge of racetrack
    \draw[thick, color=magenta] (\rvec,0,0.3) arc (0:180:\rvec); % outer edge of racetrack

Offset Concentric Curves

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.