TikZ Challenge 3 - Vector Diagram

In summary, we have seen a conversation about the third challenge to create a vector diagram using TikZ. The picture can be used for geometric figures, physical diagrams, or state diagrams and can be enhanced with the use of the arrows tikz library or arrows.meta tikz library. Only one submission is allowed and any changes to the picture will result in disqualification. The conversation also provides resources for creating TikZ pictures and tips for improving the picture, such as using [thick] or [ultra thick] for thicker lines, [>=stealth] for better arrows, and [shorten >=3pt] to avoid overlapping arrow heads. It also suggests using '\usetikzlibrary{arrows}' or its successor '\usetik
  • #1
I like Serena
Homework Helper
MHB
16,336
258
Who can make the most impressive, interesting, or pretty TikZ picture?

This third challenge is to create a vector diagram.
Such as used in geometric figures, or in physical diagrams with forces and velocities, or in state diagrams.
For more impressive arrows, we might use the arrows tikz library, or the arrows.meta tikz library (its successor).
If it's not immediately obvious, please mention what makes your picture special.

Please post your submission in this thread.
This thread will be closed after 2 weeks.
After that we will have 2 weeks to vote on what we think is the best TikZ contribution for this challenge.

Only 1 submission of a picture is allowed, and it is not allowed to change the picture after submission.
Any change to the picture itself will disqualify it.
(That leaves some wiggling room for editing the description.)
See http://mathhelpboards.com/tikz-pictures-63/tikz-announcement-22140.html for more information on how to create and post TikZ pictures.
To help create pictures we can use this http://35.164.211.156/tikz/tikzlive.html.
See the TikZ and PGF Manual for more details on the possibilities of TikZ.
 
Mathematics news on Phys.org
  • #2
\begin{tikzpicture}[scale=3]
\coordinate (v1) at (0,0);
\coordinate (v2) at (1,1);
\coordinate (v3) at (0,2.5);

\draw[->] (v1) -- node
{$\vec{B}$} (v2);
\draw[->] (v2) -- node
{$\vec{H}$} (v3);
\draw[->] (v1) -- node
{$\vec{M}$} (v3);

\end{tikzpicture}

Ok in the spirit of submitting something this is my first time using TikZ. I'm not at all familiar with the syntax so had to use a template from elsewhere. I guess this is my "Hello, world!". Can anyone figure how to sweeten the picture? Maybe thicker lines, colors and better arrows? :)​
 
  • #3
Hey Jameson, thank you for your contribution!

To answer your questions, we can add [thick] or [ultra thick] between square brackets to make the lines thicker.
And we can add [>=stealth] to get better arrows.
Doing this globally (within the first set of square brackets) we get:
\begin{tikzpicture}[scale=3, ultra thick, >=stealth]
\coordinate (v1) at (0,0);
\coordinate (v2) at (1,1);
\coordinate (v3) at (0,2.5);

\draw[->] (v1) -- node
{$\vec{B}$} (v2);
\draw[->] (v2) -- node
{$\vec{H}$} (v3);
\draw[->] (v1) -- node
{$\vec{M}$} (v3);
\end{tikzpicture}
Since the arrow heads are overlapping, we can shorten the arrows with [shorten >=3pt].
\begin{tikzpicture}[scale=3, ultra thick, >=stealth, shorten >=3pt]
\coordinate (v1) at (0,0);
\coordinate (v2) at (1,1);
\coordinate (v3) at (0,2.5);

\draw[->] (v1) -- node
{$\vec{B}$} (v2);
\draw[->] (v2) -- node
{$\vec{H}$} (v3);
\draw[->] (v1) -- node
{$\vec{M}$} (v3);
\end{tikzpicture}
To get even better arrows, and have more control, we can add '\usetikzlibrary{arrows}' or its successor '\usetikzlibrary{arrows.meta}' and use more dedicated directives.
See chapter 16 in the latest TikZ and PGF manual.
Oh, and for colors, we can add the name of a color in square brackets, such as [blue]. The manual also explains how to get more subtle colors.​
 

FAQ: TikZ Challenge 3 - Vector Diagram

What is TikZ Challenge 3 - Vector Diagram?

TikZ Challenge 3 - Vector Diagram is a problem-solving challenge that involves creating vector diagrams using the TikZ package in LaTeX. It is a popular challenge among scientists, mathematicians, and computer programmers.

What is TikZ?

TikZ is a powerful graphics package for creating high-quality diagrams and figures in LaTeX. It is commonly used in scientific and technical fields for creating vector graphics.

How do I get started with TikZ Challenge 3?

To get started with TikZ Challenge 3, you will need to have some basic knowledge of TikZ and how to use it in LaTeX. There are many online tutorials and resources available to help you get started. Once you have a good understanding of TikZ, you can attempt the challenge and work on creating your vector diagram.

What is the purpose of TikZ Challenge 3?

The purpose of TikZ Challenge 3 is to test your skills in creating vector diagrams using TikZ. It is a fun and challenging way to improve your understanding of TikZ and its capabilities.

Are there any tips for successfully completing TikZ Challenge 3?

Some tips for successfully completing TikZ Challenge 3 include practicing with simple TikZ diagrams first, breaking down the problem into smaller parts, and seeking help from online forums and communities if you get stuck. It is also helpful to have a good understanding of vector mathematics and concepts before attempting the challenge.

Similar threads

Replies
5
Views
2K
Replies
2
Views
1K
Replies
1
Views
2K
Replies
1
Views
5K
Replies
31
Views
4K
Replies
15
Views
4K
Replies
4
Views
2K
2
Replies
67
Views
12K
Back
Top