I have a label which is linked to an anchor. The problem is to find on which one of the four side of the label (which is a Rectangle) should be linked to the anchor.  |label|&lt;----[anchor]   So I created a vector from the label center to the top right of the label (v1), a vector from the center to the bottom right (v2), to the top left (v3) and bottom left (v4). I also create a vector from the center of the label to my anchor (v).  My problem is to find if v is between (v1,v2) , (v1,v3) , (v1, v4) or(v4, v2) so I can know from which side I should link my anchor.  to calculate if a vector v is between v1 and v2 I use the following formula :   (crossProduct v1, v &gt;= 0 and crossProduct v, v2 &gt;= 0) or   (crossProduct v1, v &lt;= 0 and crossProduct v, v2 &lt;= 0)   where crossProduct is calculated with the following formula:  v1.y * v2.y - v1.x * v2.x   However I'm not able to find the correct side of the rectangle.
123745
If I have a point that is considered the origin and two lines that extend outwards infinitely to two other points, what is the best way to determine whether or not a fourth point resides on or within the angle created by those points?  The process I'm currently using is to get the angle of all three lines that extend out from the origin and then check to see whether the third angle is within the range of the first two.  Grid space is defined as Screen Space, that is, 2D Cartesian with the Y-Axis flipped so "up" is negative y and the origin is the upper left corner.
20274
Not a homework question instead its a doubt in concepts about vectors related to tension force I was learning about vectors and i encountered a problem in breaking vector of tension force t, as I have given all details already please refer to it, I am sorry to write question in image, but it my best possible handwriting , please dont discard it🙂 To explain my issue a little: In lower two diagrams I have drawn vector t in string t Which is pulling from both sides. But when I breaks vector t in separate cases, I gets vectors also in opposite direction(img 2 and img 3) Since single force cant have vectors in all four direction[two in 1 case and 2 in other] I concluded one of my fig 2 or 3 is wrong. Which is wrong as per you? Why do you the option you which you did not chose is wrong? Also if you can theoritically or by intution explain how tension is pulling at both ends I would be grateful tp you.
52360
I have an example:    How to find point A's xy location (assuming point A can be anywhere on rectangle (not 4 small one, I mean the large one), including corners, but not inside or outside rectangle), with known alpha, beta angles, width, height and center xy location (center can be any position too, not just (0, 0) ) ?  Is there a formula too? If so, include it :)  P.S: I know about , but this one only have one angle to calculate..
47618
I am trying to label the angles of a triangle. I can't figure out why my code is kicking the name to the outside. My apologies for any formatting issues; this is my first post here. \documentclass{article} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture}[dot/.style={fill,circle,inner sep=1.5pt}] \path (80:5) node [dot,label=above left:A]{} coordinate (A) (20:9) node[dot, label=right:B]{} coordinate (B) (0:0) node[dot,label=below left:C]{} coordinate(C);  \path coordinate (Q)at((C)!(A)!(B)) node at (Q)[]{} ;  \draw[-] (A)--(C); \draw[-] (C)--(B); \draw[-] (A)--(B); \draw[purple!70!black] (A)--(Q);  \tkzMarkRightAngle(A,Q,C);  \draw[|&lt;-&gt;|] ((P)!−7mm!90:(B))--node[fill=white,sloped] {x} ((B)!−7mm!−90:(P)); \draw[|&lt;-&gt;|] ((Q)!−4.9mm!90:(A))--node[fill=white] {10} ((A)!−3mm!−90:(Q));  \tkzMarkAngle[size=0.75cm,color=black,label=α]; \tkzMarkAngle[size=1cm,color=black,label=β]; \tkzMarkRightAngle(B,A,C); \end{tikzpicture} \end{document}  I am trying to fit $\beta$ inside the triangle instead of its current location.
38782
I want to display some results of a performance test in a diagram as ybar stacked, but as you can see, some labels are printed over others and are hard to read (because of colors). Now I want labels on right side of bars, like , but is there an automatic way to do this or I have to create all labels on my own? And can I make it so that lines are not going horizontal, and targeting the center of the stack element?  Current:    Wished:    \documentclass[chapterprefix=true]{scrbook} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \usepackage{tikz} \usetikzlibrary{pgfplots.statistics}  \begin{document}  \begin{tikzpicture}     \begin{axis}[     ybar stacked,     ymin = 0,     ymax = 570,     xtick=data,     symbolic x coords={a, b},     nodes near coords]     \addplot coordinates{ (a, 2.9) (b, 2.9)};     \addplot coordinates{ (a, 80) (b, 200)};     \addplot coordinates{ (a, 400) (b, 100)};     \end{axis} \end{tikzpicture}  \end{document}
121636
Is it somehow possible that I can extend the link to something which I produce by using \ref with a label by the word standing before \ref? If I write something like that: For further information, have a look into chapter \ref{chap:abc} and figure \ref{fig:def}  then the only thing being &quot;clickable&quot; are the chapter number and the figure number. Is it somehow possible to make the words &quot;chapter&quot; and &quot;figure&quot; being linked to those objects as well?
8647
I am trying to label two curved paths connecting two nodes with labels placed at their centres using the node[midway] option. This is something that should be very simple but I have not been able to come up with something that works. Here is my MWE with my question as two comments:  \documentclass[crop,border=0]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[&gt;=latex]     \node [draw,rectangle] (Start) {Start};     \node [draw,rectangle] (Finish) [right=2cm] {Finish};     \draw [-&gt;,out=90,in=90,looseness=0.75] (Start.north) to (Finish.north);     % I want to label this path using [midway,below] as {forward}     \draw [-&gt;,out=-90,in=-90,looseness=0.75] (Finish.south) to (Start.south);     % I want to label this path using [midway,above] as {reverse} \end{tikzpicture} \end{document}   Can someone please point me in the right direction.  I also appreciate comments to improve code elegance or simplicity.  Thank you.
39635
There are two vectors called $\vec{a}$ and $\vec{b}$. Vector $\vec{c}$ is the bisector and it can be given as  $$\vec{c} = |b|\vec{a} + |a|\vec{b}$$  How to prove that? I have used the dot product method. But there I can't find the angle between them. Then I tried to do this by using unit vectors. Then I got an answer like in the given picture. . Can you help me to get the correct answer
78418
Have some  non-null $\vec{a}$ and $\vec{b}$.      I am trying to prove this to no avail:  $$||\vec{a}+\vec{b}|| = ||\vec{a}-\vec{b}|| \iff \vec{a} \perp \vec{b}$$    If we start with  $$||\vec{a}+\vec{b}|| = ||\vec{a}-\vec{b}|| \implies \vec{a} \perp \vec{b}$$  Our hypothesis is  $$||\vec{a}+\vec{b}|| = ||\vec{a}-\vec{b}||$$  Which tells us that both horizontal sides of this triangle have the same length, so we got an isosceles triangle. Not sure what to make out of that though.  Anyway, the hypothesis is equivalent to  $$\sqrt{(\vec{a} + \vec{b})\cdot (\vec{a} + \vec{b})} = \sqrt{(\vec{a} - \vec{b})\cdot (\vec{a} - \vec{b})}$$  I can't make much out of that.    A hint to begin tackling this problem would be appreciated.
97347
Here is the code which has an equation in the form of \[... \]:  \documentclass[12pt]{report} \usepackage{braket} \usepackage{amssymb} \usepackage{amsmath} \begin{document} \textbf{Proof-} Every element of $\Delta(G)\Delta(G,N)\subset N'$ can be written as \((x-1)y(n-1)\) where \(x,y\in G\) and \(n\in N\). Now, because we can write \((x-1)y=xy-y=(xy-1)-(y-1)\) we also can write every $(g-1)$ in the form : \[g-1=\sum_{i,j}a_{ij}(x_i-1)(n_j-1), \hspace{2pt}\ a_{ij}\in \mathbb{Z}, x_i\in G, n_j\in N \] \end{document}   My question is how to label the last formula as (*)? All the answers I can find has aligned equations, but in this case I only have one \[...\] equation which I want to label. One way is to use \hspace and then put label,  but is there any other way?
16281
Most questions usually just relate to what these can be used for, that's fairly obvious to me since I've been programming 3D games/simulations for a while, but I've never really understood the inner workings of them... I could get the cross product equation as a determinant of a carefully-constructed matrix,   but what I want to ask is... How did the dot and cross product come to be? When were they "invented"? Some detailed proofs? Did someone say: "Hey, wouldn't it be nice if we could construct a way to calculate a vector that is perpendicular to two given operands?"  Basically, how/why do they work?  I would appreciate explanations, links to other explanations, other web resources... I've been searching the Internet lately for explanations, but most of them are on how to use it and nothing that really gives substance to it.
60710
It seems like I'm doing something wrong when using foreach variables to indicate node numbers. The two foreach loops are anchoring the paths to the east of each node. Why does this happen?    \documentclass{article}  \usepackage{tikz} \usetikzlibrary{backgrounds,fit,patterns,decorations.pathreplacing,calc}  \makeatletter \tikzset{   labelnode/.style={draw=none, fill=none, black},   latentnode/.style={draw, minimum width=5mm, shape=circle, ultra thick, black},   dagconn/.style={arrows=-&gt;, black, thick}, } \makeatother  \begin{document} \begin{tikzpicture}[scale=1]  \pgfmathsetmacro{\colgap}{1.6}  \pgfmathsetmacro{\rowgap}{1.3}   \node[labelnode] (x1) at (\colgap*0,\rowgap*1) {$X_1$};  \node[labelnode] (x2) at (\colgap*1,\rowgap*1) {$X_2$};  \node[labelnode] (x3) at (\colgap*2,\rowgap*1) {$X_3$};   \node[latentnode,blue] (x4) at (\colgap*0,\rowgap*0) {$X_4$};  \node[latentnode,red] (x5) at (\colgap*1,\rowgap*0) {$X_5$};  \node[labelnode] (x6) at (\colgap*2,\rowgap*0) {$X_6$};   \foreach \c in {1,...,2} {    \foreach \r in {1,...,2} {      \pgfmathsetmacro{\st}{(((\r-1)*3)+\c)}      \pgfmathsetmacro{\en}{\st+1}      \draw[dagconn] ([xshift=0.2cm]x\st) to ([xshift=-0.9cm]x\en);    }  }   \foreach \c in {1,...,3} {    \foreach \r in {1,...,1} {      \pgfmathsetmacro{\st}{((\r-1)*3)+\c}      \pgfmathsetmacro{\en}{\st+3}      \draw[dagconn] (x\st) to (x\en);    }  } \end{tikzpicture} \end{document}
112715
MWE:  \documentclass[11pt,a4paper]{article} \usepackage{blindtext} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \usepackage{color}  \begin{document} \begin{center}  \begin{tikzpicture} \tkzDefPoint(0,0){B} \tkzDefPoint(6,0){C} \tkzDefPoint(3,5){A}  \tkzDrawSegment(A,B) \tkzDrawSegment(B,C) \tkzDrawSegment(C,A)  \tkzDefMidPoint(A,B) \tkzGetPoint{D}  \tkzDefMidPoint(B,C) \tkzGetPoint{E}  \tkzDefMidPoint(C,A) \tkzGetPoint{F}  \tkzDefPoint[label={[align=left]above:$A(a,b)$},xshift=00mm](3,5){A} \tkzDefPoint[label={[align=right]left:$B(c,d)$},xshift=00mm](0,0){B} \tkzDefPoint[label={[align=left]right:$C(e,f)$},xshift=00mm](6,0){C}  \tkzLabelPoints[left](D) \tkzLabelPoints[right,below](E) \tkzLabelPoints[right](F)  \tkzDrawSegment(D,E) \tkzDrawSegment(E,F) \tkzDrawSegment(D,F) \end{tikzpicture} \end{center} \end{document}   Question: How can i give the labels (x1,y1), (x2,y2) and (x3,y3) to points D, E and F respectively.
5875
I get the physical significance of vector addition &amp; subtraction. But I don't understand what do dot &amp; cross products mean?   More specifically,    Why is it that dot product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\cos\theta$? Why is it that cross product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\sin\theta$, times a unit vector determined from the right-hand rule?   To me, both these formulae seem to be arbitrarily defined (although, I know that it definitely wouldn't be the case).   If the cross product could be defined arbitrarily, why can't we define division of vectors? What's wrong with that? Why can't vectors be divided?
89824
Sometimes I want to refer (using \ref) a \label from some other tex file. What is the right way to do it?  (It's, of course, possible to \include all files in one and then use \includeonly — but it breaks e.g. page and section numbering.)
104526
I have two object, need attach 'TWO OBJECT' to 'ONE OBJECT'.  I have vectors 'angle' 'origin' of ONE and TWO objects.  I tried do "TWOOBJECT.origin += ONE.origin - ONE.oldorigin", this just attach coordinates, but not rotate with one object....
44707
(Please feel free to offer a better and more precise subject title.)  I have two vertical chains with different count of nodes in it. But I want to visualize that some nodes of the right belong to one of the left. They need to appear in the same row/line. In the example code below you see Y and two nodes should appear on the right side of it.    The problem here is that I can not handle the right chain like it has 4 nodes and join them. Using \matrix make it impossible to use chain.  \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,positioning,chains,scopes}  \begin{document} \begin{tikzpicture}     [         myright/.style={             draw},         myleft/.style={             myright,             on chain,             fill=cyan!30}     ]     % LEFT     {[start chain=L going below,       every node/.append style=myleft]         \node {X};         \node {Y};         \node {Z};     }      % RIGHT     {[start chain=R going below]         \node [myright,right=of L-1] {belong to X};          \matrix [right=of L-2]         {             \node [myright] {belong to Y};\\             \node [myright] {also belong to Y};\\         };          \node [myright,right=of L-3] {belong to Z};     } \end{tikzpicture} \end{document}   btw: This question is related to .