## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ tikZ | Coordinate Parameters

Information and discussion about graphics, figures & tables in LaTeX documents.
psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

### tikZ | Coordinate Parameters

I am using Pgf Tikz to produce a diagram

It shows a mass at rest on a ramp. For most points I have been able to parameterise the coordinates (meaning that, for example, I can change the angle of the ramp or the mass size by changing a single parameter. The code follows:


I now want to add an arrow vertically downwards from the centre of the mass. The line
\draw [->] \massCentre -- (5.85,6 |- 0,0);

gives me this, but I have had to 'hard-code' the x-coordinate of the mass Centre. If I use
\draw [->] \massCentre -- (\massCentre |- 0,0);

I get an error
Package tikz Error: Cannot parse this coordinate.

Also can someone explain how the relative coordinates in
\draw [->] \massCentre --  +(-1,1);

work? I would have expected

\draw [->] \massCentre --  +(-2,2);

Stefan Kottwitz
Posts: 9604
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

welcome to the board!

Have a look at Free body diagrams in TikZ, there's also a mass on a ramp, and arrows on a mass object.

Stefan

psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm
Thanks Stefan

I'll study with interest

### Who is online

Users browsing this forum: Google [Bot] and 3 guests