stanli 包中的“\internalforces”命令

stanli 包中的“\internalforces”命令

关于使用 Stanli 包绘制内力图。需要以下参数:

  • 起点
  • 终点
  • 起点处的值
  • 终点值
  • 抛物线高度
  • 颜色
  • 弯头位置

问题在于可选参数(抛物线高度)和(弯曲位置)。我该如何设置它们,从图形的角度来看它们代表什么。下面的 MWE 表示具有三角形载荷的简单梁。为了绘制这种梁的剪切力和弯矩图,我将反应值设置为 2 个值,其中一个是另一个的两倍……然而

  • 如何设置剪切力图的曲线
  • 如何设置弯矩图的曲线,因为在这种情况下,BMD 曲线不是对称的,而且你只能设置曲线公式的起始值和终止值
  • 如何设置弯曲位置参数
  • 如何定义三阶和四阶抛物线
  • 最后,有没有办法定义抛物线载荷而不是三角形载荷?

如果这两个参数(抛物线高度和弯曲位置)有任何视觉表示,这将会很有帮助。还有没有办法定义抛物线负载?

\documentclass{article}
\usepackage{amsmath} 
\usepackage{stanli}

\begin{document}

\begin{center}
\begin{tikzpicture}

\draw[help lines,step=0.5](0,0) grid(15,24);


%%%%%%%%%%%%%%%%%%%%%%%%Loading%%%%%%%%%%%%%%%%

\point{a-LD}{0}{22.5};
\point{b-LD}{10}{22.5};
\point{su-LD}{2}{22.5+1.5};
\point{s-LD}{2}{22.5};
\point{sl-LD}{2}{22.5-0.5};
\point{TL-LD}{10}{22.5+2};
\point{CAP-LD}{10/2}{22.5-2.5};

% Elements

\beam{4}{a-LD}{b-LD};

%Supports

\support {1}{a-LD};
\support {2}{b-LD};


%Loads

\lineload{1}{a-LD}{b-LD}[0][2][0.035]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%First diagram%%%%%%%%%%%%%%%%%%

\point{a-FBD}{0}{22.5-6};
\point{b-FBD}{10}{22.5-6};
\point{TL-FBD}{2*10/3}{22.5-6};
\point{TLA-FBD}{2*10/3}{22.5-6+1.75};
\point{HR}{0-1.5}{22.5-6};
\point{VRA}{0}{22.5-6-1};
\point{VRB}{10}{22.5-6-1};
\point{CAP-FBD}{10/2}{22.5-6-3.5};

% Elements

\beam{4}{a-FBD}{b-FBD};




%%%%%%%%%%%%%%%%%Second diagram%%%%%%%%%%%%%%%%%%

\internalforces{a-FBD}{b-FBD}{-3}{6}[0][red]%[0]


\point{a-SFD}{0}{22.5-14};
\point{b-SFD}{10}{22.5-14};
\point{TL-SFD}{2*10/3}{22.5-14};
\point{TLA-SFD}{2*10/3}{22.5-14+1.75};
\point{VRA}{0}{22.5-14-1};
\point{VRB}{10}{22.5-14-1};
\point{CAP-SFD}{10/2}{22.5-14-3.5};

% Elements

\beam{4}{a-SFD}{b-SFD};

\internalforces{a-SFD}{b-SFD}{-3}{6}[3][red]%[0]


\end{tikzpicture}
\end{center}

\end{document}


我能够从包 .sty 文件中获取此类命令的宏,但由于它使用了大量 TIKZ 编程,因此我在分析它时遇到了问题。


%------------------------------------------------
%       internalforces
%------------------------------------------------
%           \internalforces{initial point}{end point}{initial value}{end value}[parabola height][color][bend position]
%               [parabola height][color][bend position] are optional
%


\newcommandx{\internalforces}[7][5=0,6=red,7=.6667]{%
    \coordinate (internalforcesVarA) at ($ (#1)!#3cm!-90:(#2) $);
    \coordinate (internalforcesVarB) at ($ (#2)!#4cm!90:(#1)$);
    \coordinate (internalforcesVarAB) at ($ (internalforcesVarA)!.5!(internalforcesVarB)$);
    \coordinate (internalforcesVarC) at ($ (internalforcesVarAB)+2*(0,#5)$);
    \coordinate (internalforcesVarAC) at ($ (internalforcesVarA)!#7!(internalforcesVarC)$);
    \coordinate (internalforcesVarBC) at ($ (internalforcesVarB)!#7!(internalforcesVarC)$);
    \ifthenelse{\equal{#5}{0}}{
        \draw [bigLine,color=#6] (#1) -- (internalforcesVarA) (internalforcesVarA) -- (internalforcesVarB) (internalforcesVarB) -- (#2);
        \fill [color=#6] (internalforcesVarA) circle (\bigLineWidth/2);
        \fill [color=#6] (internalforcesVarB) circle (\bigLineWidth/2);
        \fill [color=#6] (#1) circle (\bigLineWidth/2);
        \fill [color=#6] (#2) circle (\bigLineWidth/2);
    }
    {
        %\draw [bigLine,color=#6](internalforcesVarA) parabola[parabola height=#5cm] (internalforcesVarB);
        %\draw [bigLine,color=#6](internalforcesVarA)--(internalforcesVarAC)--(internalforcesVarBC)--(internalforcesVarB);
        %\draw [bigLine,color=blue](internalforcesVarA)--(internalforcesVarB)
        %(internalforcesVarAB) -- (internalforcesVarC);
        \draw [bigLine,color=#6] (#1) -- (internalforcesVarA) (internalforcesVarA) .. controls (internalforcesVarAC) and (internalforcesVarBC) .. (internalforcesVarB) (internalforcesVarB) -- (#2);
        \fill [color=#6] (internalforcesVarA) circle (\bigLineWidth/2);
        \fill [color=#6] (internalforcesVarB) circle (\bigLineWidth/2);
        \fill [color=#6] (#1) circle (\bigLineWidth/2);
        \fill [color=#6] (#2) circle (\bigLineWidth/2);
    }
    
}
``````````````````````````````````````````````````````````````````````

What I understood is that:

- \coordinate (internalforcesVarA) at ($ (#1)!#3cm!-90:(#2) $); makes point along the vertical projection of {initial value} from the {start point} in cm along the line connecting {initial point} and {end point}

- \coordinate (internalforcesVarB) at ($ (#2)!#4cm!90:(#1)$); makes a point along the vertical projection of {end value} from the {end point} in cm along the line connecting {initial point} and {end point}

- \coordinate (internalforcesVarAB) at ($ (internalforcesVarA)!.5!(internalforcesVarB)$); makes a mid-point along the line joining {initial value} and the {end value}  

- \coordinate (internalforcesVarAC) at ($ (internalforcesVarA)!#7!(internalforcesVarC)$); makes a point along the line AC with offset set according to [bend position]

- \coordinate (internalforcesVarBC) at ($ (internalforcesVarB)!#7!(internalforcesVarC)$); makes a point along the line BC with offset set according to [bend position]

After that it gets messy
```````````````````````````````````````````````````````````````````````
[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/P4KQT.jpg

答案1

在一般性回答之前,我需要说一个前提条件。

  1. 介绍
  2. 回答问题
  3. 其他需要理解的例子

  1. 请看这个问题提醒你数学题目。

手册.pdf、13.5.3部分修饰语的语法

<coordinate>!<number>!<angle>:<second coordinate>

例如,可以这样写 ,其含义为:“使用从到 的(1,2)!.75!(3,4) 路程的四分之三处的坐标。”通常,得出坐标。(1,2)(3,4)<coordinate x>!<number>!<coordinate y>(1- <number>)<coordinate x> +<number><coordinate y>

代码 exam1a:

\documentclass[tikz,varwidth,border=3.14mm]{standalone}
\usepackage{amsmath} 
\usetikzlibrary{calc,decorations.pathreplacing}

\begin{document}

\begin{tikzpicture}
\draw[help lines,line width=.4pt,step=1] (0,0) grid (3,4);

\node [left] at (0,0) {o};
% exam for point  (1,2)!.75!(3,4)
\coordinate [label=left:$A$] (A) at (1,2);
\coordinate [label=right:$B$](B) at (3,4);
\draw [->](A)--(B);

\coordinate [label=above left:\tiny $AB$] (AB) at ($(A)!.75!(B)$);
% (1-.75)(A) + .75(B)
% Result AB=(2.5,3.5)

\fill [red](AB) circle(1pt);
% draw brace
\draw [decorate,decoration={brace,amplitude=6pt},xshift=-2pt,red] (A) -- (AB) node [above,blue,font=\footnotesize,midway,rotate=45,yshift=5pt] {$0.75$} ;

\end{tikzpicture}

\end{document}

输出: 在此处输入图片描述

<second coordinate>前面可以加一个<angle>,中间用冒号隔开,例如(1,1)!.5!60:(2,2)。 的一般含义是:“首先考虑从到 的<a>!<factor>!<angle>:<b>直线。然后绕点 旋转这条直线。则这条直线的两个端点将是和某个点。利用这一点进行后续计算,即中途计算。”<a><b><a><a><c><c>

代码 exam1b:

\documentclass[tikz,varwidth,border=3.14mm]{standalone}
\usepackage{amsmath} 
\usetikzlibrary{calc,decorations.pathreplacing}

\begin{document}

\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1] (0,0) grid (3,4);
\node [left] at (0,0) {o};

% exam for point  (1,1)!.5! 60:(2,2)
\coordinate [label=below right:$A$] (A) at (1,1);
\coordinate [label=right:$B$](B) at (2,2);
\draw[->] (A) -- (B);

\coordinate [label=left:$c$] (c) at ($ (A)!1! 60:(B) $);
% Result c=(0.63397,2.36603)
\draw[->,red] (A) -- (c);

\draw [cyan,->]([shift=(45:4mm)]A) arc (45:105:4mm)node [above,midway] {\tiny $60^{\circ}$};

\path let    \p{1} = (c)    in (c) node[yshift=2mm,label=above:\tiny\pgfmathparse{\x1/28.45274}${x_c=}\pgfmathresult $]{} circle (0pt)node[label=above:\tiny\pgfmathparse{\y1/28.45274}${y_c=} \pgfmathresult $]{};
\draw [decorate,decoration={brace,amplitude=4pt},xshift=-1pt,green] (A) -- (0.63397,1) node [below,blue,font=\footnotesize,midway] {$x_c$} ;
\draw [decorate,decoration={brace,amplitude=4pt},xshift=-1pt,green]  (0.63397,1)--(0.63397,2.36603) node [left,blue,font=\footnotesize,midway] {$y_c$} ;

%     (1,1)!.5!60:(2,2)
\fill [blue]($ (A)!.5! 60:(B) $) circle (1.5pt);
% (1-.5)(A) + .5(0.63397,2.36603)
% Result Ac=(.81699,1.68301)

\end{tikzpicture}

\end{document}

输出: 在此处输入图片描述

笔记:上述坐标的计算也可以按如下方式进行。

\def\xa{1}
\def\ya{1}
\def\xb{2}
\def\yb{2}
%
\pgfmathsetmacro{\xnewResults}{{add(multiply(sqrt(add(pow(subtract(\xb,\xa),2),pow(subtract(\yb,\ya),2))),cos(105)),1) }}
\pgfmathsetmacro{\ynewResults}{{add(multiply(sqrt(add(pow(subtract(\xb,\xa),2),pow(subtract(\yb,\ya),2))),sin(105)),1) }}
\begin{equation*}
c=
\begin{cases}
x_c=\xnewResults 
\\
y_c=\ynewResults 
\end{cases}
\end{equation*}
%
\def\num{.5}
\def\xa{1}
\def\ya{1}
\def\xb{0.63397}
\def\yb{2.36603}
%
\pgfmathsetmacro{\xpointResults}{{add(multiply(subtract(1,\num),\xa),multiply(\num,\xb)) }}
\pgfmathsetmacro{\ypointResults}{{add(multiply(subtract(1,\num),\ya),multiply(\num,\yb)) }}
\begin{equation*}
P_{Ac}=
\begin{cases}
x_p=\xpointResults 
\\
y_p=\ypointResults 
\end{cases}
\end{equation*}

输出: 在此处输入图片描述

参见 pgfmanual.pdf,13.5.4 距离修饰符的语法

<coordinate>!<dimension>!<angle>:<second coordinate>

代码 exam1c:

\documentclass[tikz,varwidth,border=2mm]{standalone}
\usetikzlibrary{calc}
 
\begin{document}

\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
\coordinate[label=below:$a$] (a) at (1,0);
\coordinate [label=below:$b$] (b) at (3,1);
\draw (a) -- (b);

\coordinate (c) at ($ (a)!.25!(b) $);
\fill [red] (c) circle(1pt)node[below]{$c$};

\coordinate (d) at ($ (c)!1cm!90:(b) $);
\fill [blue] (d) circle(1pt)node[above]{$d$};

\draw [<->] (c) -- (d) node [sloped,midway,above] {1cm};
\end{tikzpicture}

\end{document}

输出: 在此处输入图片描述


第2部分:请考虑最小代码,首先用斯坦利包,然后使用蒂克兹包裹

代码考试2a:用 stanli 画画

\documentclass[border=12mm]{standalone}
\usepackage{amsmath} 
\usepackage{stanli}

\begin{document}

\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1](0,0) grid(10,14);
\point{o}{0}{0}; 
\notation {1}{o}{$o$}[left];

\point{a-SFD}{0}{22.5-14}; %(0,8.5)
\point{b-SFD}{10}{22.5-14};%(10,8.5)
\notation {1}{a-SFD}{$a-SFD$}[left];
\notation {1}{b-SFD}{$b-SFD$}[right];

\beam{4}{a-SFD}{b-SFD};

%\internalforces{initial point}{end point}{initial value}{end value}[parabola height][color][bend position]
% Default :parabola height=0, color=red, bend position=.6667
%draw 
\internalforces{a-SFD}{b-SFD}{-3}{6}[3][red]%[0]

\node [red,below] at (5,0){draw with stanli};

\end{tikzpicture}

\end{document}

使用 tikz 绘制:

\documentclass[tikz,border=12mm]{standalone}
\usepackage{amsmath} 
\usetikzlibrary{calc}

\begin{document}


\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1] (0,0) grid(10,14);
\node at (0,0)[left]{$o$};
\draw [thick] (0,8.5)node[left]{$a-SFD$}--(10,8.5)node[right]{$b-SFD$};

% def stanli.sty
\coordinate (internalforcesVarA) at ($ (0,8.5)!-3cm!-90:(10,8.5) $);%#3 ,initial value=-3
% (0,8.5)!1!-90:(10,8.5) first rotate -90 , next -3cm above (0,8.5)+(0,3)
%Result: A=(0,11.5)

\coordinate (internalforcesVarB) at ($ (10,8.5)!6cm!90:(0,8.5)$);%#4 ,end value=6
% (10,8.5)!1!90:(0,8.5) first  rotate 90 , next 6cm below (10,8.5)+(0,-6)
%Result: B=(10,2.5)

\coordinate (internalforcesVarAB) at ($ (internalforcesVarA)!.5!(internalforcesVarB)$);
%Result: AB=(1-.5)A + .5(B)=(5,7)

\coordinate (internalforcesVarC) at ($ (internalforcesVarAB)+2*(0,3)$);%#5 ,parabola height=3
%Result: C=AB +(0,6) =(5,13)

\coordinate (internalforcesVarAC) at ($ (internalforcesVarA)!.6667!(internalforcesVarC)$);%#7, bend position=.6667
%Result: AC=(1-.6667)A+ .6667(C)=(3.3335,12.50005)

\coordinate (internalforcesVarBC) at ($ (internalforcesVarB)!.6667!(internalforcesVarC)$); %#7, bend position=.6667
%Result: BC=(1-.6667)B+ .6667(C)=(6.6665,9.50035)

\draw [line width=1.5pt,color=red] (0,8.5) -- (internalforcesVarA) % Left Line
                                                   (internalforcesVarA) .. controls (internalforcesVarAC) and (internalforcesVarBC) .. (internalforcesVarB) %controls
                                                   (internalforcesVarB) -- (10,8.5); %Right Line
%
\draw [thin] (internalforcesVarA)--(internalforcesVarB);
% 
\draw [thin,magenta] (internalforcesVarA)--(internalforcesVarC);
\draw [thin,magenta] (internalforcesVarB)--(internalforcesVarC);
%
\fill [color=blue] (internalforcesVarA) circle (.75pt)node[above,font=\small]{A};
\fill [color=blue] (internalforcesVarB) circle (.75pt)node[below,font=\small]{B};
\fill [color=blue] (0,8.5) circle (.75pt);
\fill [color=blue] (10,8.5) circle (.75pt);
%
\fill [color=blue] (internalforcesVarAC) circle (1pt) node[above,font=\small]{AC};  
\fill [color=blue] (internalforcesVarBC) circle (1pt) node[right,font=\small]{BC};  
%
\fill [color=cyan] (internalforcesVarAB) circle (1pt) node[above,font=\small]{AB};  
\fill [color=cyan] (internalforcesVarC) circle (1pt) node[above,font=\small]{C};
        
\node [blue,below] at (5,0){draw with tikz};
        
\end{tikzpicture}

\end{document}

输出:

在此处输入图片描述

代码示例 2b:绘制 stanli 和 tikz

\documentclass[12pt,a4paper]{report}
%\usepackage{tikz}
%\usetikzlibrary{calc}
\usepackage{stanli} 

\begin{document}

\begin{center}
\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1] (0,-2) grid (4,3);
\point{a}{0}{0};
\point{b}{4}{0};
%\internalforces{initial point}{end point}{initial value}{end value}[parabola height][color][bend position]
% Default :parabola height=0, color=red, bend position=.6667
\internalforces{a}{b}{1}{-1}[1][black];

\node [font=\small,blue,below] at (2,-1.5){draw with stanli};
\end{tikzpicture}
\hspace*{1cm}
\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1] (0,-2) grid (4,3);

\coordinate (A) at ($ (0,0)!1cm!-90:(4,0) $);%#3 ,initial value=1 
%Result: A=(0,-1)

\coordinate (B) at ($ (4,0)!-1cm!90:(0,0)$);%#4 ,end value=-1    
%Result: B=(4,1)
\draw [thin] (A)--(B);

\coordinate (AB) at ($ (A)!.5!(B)$);
%Result: AB=(2,0) 

\coordinate (C) at ($ (AB)+2*(0,1)$);% #5 parabola height=1
%Result: C=(2,2)

\coordinate (AC) at ($ (A)!.6667!(C)$);%#7, bend position=.6667
%Result: AC=(1.334,1)
\draw [thin] (A)--(C);
\draw [thin] (B)--(C);

\coordinate (BC) at ($ (B)!.6667!(C)$); %#7, bend position=.6667
%Result: BC=(2.6665,1.666)

\draw [line width=1.5pt,color=red] (0,0) -- (A) % Left Line
                                                   (A) .. controls (AC) and (BC) .. (B) %controls
                                                   (B) -- (4,0); %Right Line
    
\fill [color=blue] (A) circle (.75pt) node[below,font=\small]{A};
\fill [color=blue] (B) circle (.75pt) node[above,font=\small]{B};
\fill [color=blue] (0,0) circle (.75pt) node[left,font=\small]{0};
\fill [color=blue] (4,0) circle (.75pt) node[right,font=\small]{4};
%
\fill [color=cyan] (AB) circle (1pt) node[above,font=\small]{AB};   
\fill [color=cyan] (C) circle (1pt) node[above,font=\small]{C};
\fill [color=blue] (AC) circle (1pt) node[above,font=\small]{AC};   
\fill [color=blue] (BC) circle (1pt) node[above,font=\small]{BC};

\node [font=\small,red,below] at (2,-1.5){draw with tikz};      
\end{tikzpicture}
\end{center}

\end{document}

输出: 在此处输入图片描述


第 3 部分:

代码 exam3a:

\documentclass[tikz,varwidth,border=3.14mm]{standalone}
\usepackage{amsmath}
\usetikzlibrary{calc}

\begin{document}

\foreach \Pline in {.1,.2,...,.9}{%Point Line
\begin{tikzpicture}
\useasboundingbox (-.5,-2)rectangle (4.5,3);
\draw[help lines,line width=.6pt,step=1] (0,-2) grid (4,3);
\coordinate [label=left:$o$,font=\small] (o) at (0,0);
\draw [thick,->,blue] (o)--(4,0);
\draw [thick,->,blue] (0,-2)--(0,3);

\coordinate [label=left:$A$] (A) at (0,-1);
\coordinate [label=right:$B$](B) at (4,1);
\coordinate [label=above:$C$](C) at (2,2);

\draw [thin,->] (A)--(B);
\draw [thin,->] (B)--(C);
\draw [thin,->] (C)--(A);

\coordinate (AB) at ($(A)!\Pline!(B)$);
\fill [red](AB) circle (1pt) node[below,font=\small]{$AB$};

\coordinate (BC) at ($(B)!\Pline!(C)$);
\fill [magenta](BC) circle (1pt) node[above right,font=\small]{$BC$};

\coordinate (CA) at ($(C)!\Pline!(A)$);
\fill [cyan](CA) circle (1pt) node[above left,font=\small]{$CA$};
\end{tikzpicture}
}

\end{document}

输出: 在此处输入图片描述

代码 exam3b:

\documentclass[tikz,varwidth,border=3.14mm]{standalone}
\usepackage{amsmath} 
\usepackage{stanli}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}

%\internalforces{initial point}{end point}{initial value}{end value}[parabola height][color][bend position]
% Default :parabola height=0, color=red, bend position=.6667
%Example 1: Suppose, -2< initial value <2 , -2<end value<2 , parabola height=0
\foreach \fa in {-2,-1,...,2}{%
\foreach \fb in {-2,-1,...,2}{%
\begin{tikzpicture}
\useasboundingbox (-1,-3)rectangle (5,3);
\draw[help lines,line width=.6pt,step=1,black] (-1,-3) grid (5,3);
\draw[help lines,line width=.3pt,step=.5,gray] (-1,-3) grid (5,3);

\point{a}{0}{0};
\point{b}{4}{0};
\beam{2}{a}{b}[0][3];
\notation {1}{a}{\small $x_a$}[left];
\notation {1}{b}{\small $x_b$}[right];

\internalforces{a}{b}{\fa}{\fb}[0][blue];

\def\xa{0}
\ifnum \fa>0 
\draw [decorate,decoration={brace,amplitude=6pt},xshift=-2pt,red] (0,-\fa)node [left,red,font=\footnotesize] {$F_{\fa}^a$} -- (0,0) ;
\else
\draw [decorate,decoration={brace,amplitude=6pt},xshift=-2pt,red] (0,0) -- (0,-\fa) node [left,red,font=\footnotesize] {$F_{\fa}^a$};
\fi
%
\def\xb{4}
\ifnum \fb>0
\draw [decorate,decoration={brace,amplitude=6pt},xshift=2pt,cyan] (\xb,0) -- (\xb,-\fb) node [right,cyan,font=\footnotesize] {$F_{\fb}^b$};
\else
\draw [decorate,decoration={brace,amplitude=6pt},xshift=2pt,cyan]  (\xb,-\fb)node [right,cyan,font=\footnotesize] {$F_{\fb}^b$} -- (\xb,0) ;
\fi
\end{tikzpicture}
}}

\end{document}

输出: 在此处输入图片描述

代码 exam3c:

\documentclass[tikz,varwidth,border=3.14mm]{standalone}
\usepackage{amsmath} 
\usepackage{stanli}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}

%\internalforces{initial point}{end point}{initial value}{end value}[parabola height][color][bend position]
% Default :parabola height=0, color=red, bend position=.6667 
%Example 1: Suppose, -3< initial value <3 , -3<end value<6 , parabola height=3
\foreach \fa in {-3,-1,...,3}{%
\foreach \fb in {-3,-2,...,6}{%
\begin{tikzpicture}
\useasboundingbox (-1,-7)rectangle (11,7);
\draw[help lines,line width=.6pt,step=1,black] (-1,-7) grid (11,7);
\draw[help lines,line width=.3pt,step=.5,gray] (-1,-7) grid (11,7);

\point{a}{0}{0};
\point{b}{10}{0};
\beam{2}{a}{b}[0][3];
\notation {1}{a}{$x_a$}[left];
\notation {1}{b}{$x_b$}[right];

\internalforces{a}{b}{\fa}{\fb}[3][blue];

\def\xa{0}
\ifnum \fa>0 
\draw [thick,decorate,decoration={brace,amplitude=6pt},xshift=-2pt,red] (0,-\fa)node [left,red,font=\small] {$F_{\fa}^a$} -- (0,0) ;
\else
\draw [thick,decorate,decoration={brace,amplitude=6pt},xshift=-2pt,red] (0,0) -- (0,-\fa) node [left,red,font=\small] {$F_{\fa}^a$};
\fi

\def\xb{10}
\ifnum \fb>0
\draw [thick,decorate,decoration={brace,amplitude=6pt},xshift=2pt,,cyan] (\xb,0) -- (\xb,-\fb) node [right,purple,font=\small] {$F_{\fb}^b$};
\else
\draw [thick,decorate,decoration={brace,amplitude=6pt},xshift=2pt,cyan]  (\xb,-\fb)node [right,purple,font=\small] {$F_{\fb}^b$} -- (\xb,0) ;
\fi

\end{tikzpicture}
}}

\end{document}

输出:

在此处输入图片描述

请参阅 2.4 曲线路径构造以了解控制。

编辑:2020-10-30 弯道位置变换考试。

\documentclass[tikz,border=12mm]{standalone}
\usepackage{amsmath} 
\usetikzlibrary{calc}

\begin{document}

\foreach \bendpos in {0,.1,.2,...,1}{%bend position
\begin{tikzpicture}
\draw[help lines,line width=.6pt,step=1] (0,0) grid(10,14);
\node at (0,0)[left]{$o$};
\draw [thick] (0,8.5)node[left]{$a-SFD$}--(10,8.5)node[right]{$b-SFD$};

% def stanli.sty
\coordinate (internalforcesVarA) at ($ (0,8.5)!-3cm!-90:(10,8.5) $);%#3 ,initial value=-3
% (0,8.5)!1!-90:(10,8.5) first rotate -90 , next -3cm above (0,8.5)+(0,3)
%Result: A=(0,11.5)

\coordinate (internalforcesVarB) at ($ (10,8.5)!6cm!90:(0,8.5)$);%#4 ,end value=6
% (10,8.5)!1!90:(0,8.5) first  rotate 90 , next 6cm below (10,8.5)+(0,-6)
%Result: B=(10,2.5)

\coordinate (internalforcesVarAB) at ($ (internalforcesVarA)!.5!(internalforcesVarB)$);
%Result: AB=(1-.5)A + .5(B)=(5,7)

\coordinate (internalforcesVarC) at ($ (internalforcesVarAB)+2*(0,3)$);%#5 ,parabola height=3
%Result: C=AB +(0,6) =(5,13)

\coordinate (internalforcesVarAC) at ($ (internalforcesVarA)!\bendpos!(internalforcesVarC)$);%#7, bend position=.6667
%Result: AC=(1-.6667)A+ .6667(C)=(3.3335,12.50005)

\coordinate (internalforcesVarBC) at ($ (internalforcesVarB)!\bendpos!(internalforcesVarC)$); %#7, bend position=.6667
%Result: BC=(1-.6667)B+ .6667(C)=(6.6665,9.50035)

\draw [line width=1.5pt,color=red] (0,8.5) -- (internalforcesVarA) % Left Line
                                                   (internalforcesVarA) .. controls (internalforcesVarAC) and (internalforcesVarBC) .. (internalforcesVarB) %controls
                                                   (internalforcesVarB) -- (10,8.5); %Right Line
%
\draw [thin] (internalforcesVarA)--(internalforcesVarB);
% 
\draw [thin,magenta] (internalforcesVarA)--(internalforcesVarC);
\draw [thin,magenta] (internalforcesVarB)--(internalforcesVarC);
%
\fill [color=blue] (internalforcesVarA) circle (.75pt)node[above,font=\small]{A};
\fill [color=blue] (internalforcesVarB) circle (.75pt)node[below,font=\small]{B};
\fill [color=blue] (0,8.5) circle (.75pt);
\fill [color=blue] (10,8.5) circle (.75pt);
%
\fill [color=blue] (internalforcesVarAC) circle (1pt) node[above,font=\small]{AC};  
\fill [color=blue] (internalforcesVarBC) circle (1pt) node[right,font=\small]{BC};  
%
\fill [color=cyan] (internalforcesVarAB) circle (1pt) node[above,font=\small]{AB};  
\fill [color=cyan] (internalforcesVarC) circle (1pt) node[above,font=\small]{C};
        
\node [blue,below] at (5,0){draw with tikz};
        
\end{tikzpicture}
}

\end{document}

输出:

在此处输入图片描述

相关内容