%% examples/coordinate-projection.tex
%% Native TikZ |- projection: x from the wall, y from the block.

\documentclass[tikz,border=6mm]{standalone}
\usepackage{tikzphysics}

\begin{document}
\begin{tikzpicture}[font=\small]
  \node[ramp, minimum width=7cm, ramp run=2.2cm,
        ramp rise=1.4cm, ramp wall height=1.5cm] (R) at (0,0) {};
  \node[block, minimum width=1cm, minimum height=0.75cm,
        anchor=south] (B) at (R.floor-mid) {$m$};

  %% (R.wall-mid |- B.west) takes x from R.wall-mid and y from B.west.
  \coordinate (A) at (R.wall-mid |- B.west);
  \draw[spring] (A) -- node[above=3pt] {$k$} (B.west);
  \fill[blue!70!black] (A) circle (1.5pt);
  \node[above left=2pt] at (A) {$A$};

  \begin{scope}[xshift=10cm]
    \node[platform-left-up, minimum width=6cm, minimum height=1.8cm,
          anchor=floor-top-mid] (P) at (0,0) {};
    \node[block, minimum width=1cm, minimum height=0.75cm,
          anchor=south] (C) at (P.floor-top-25) {$m$};
    \coordinate (Q) at (P.wall-outer-mid |- C.west);
    \draw[spring] (Q) -- node[above=3pt] {$k$} (C.west);
    \fill[blue!70!black] (Q) circle (1.5pt);
    \node[above left=2pt] at (Q) {$Q$};
  \end{scope}
\end{tikzpicture}
\end{document}
