TikZ Challenge 3 - Vector Diagram

Click For Summary
SUMMARY

The TikZ Challenge 3 focuses on creating impressive vector diagrams using the TikZ package in LaTeX. Participants are encouraged to utilize the arrows and arrows.meta libraries for enhanced arrow aesthetics. Submissions are limited to one picture per participant, and any modifications post-submission will result in disqualification. The challenge will last for two weeks, followed by a voting period to determine the best contribution.

PREREQUISITES
  • Familiarity with LaTeX document preparation system
  • Understanding of TikZ package for vector graphics
  • Knowledge of using libraries in TikZ, specifically arrows and arrows.meta
  • Basic skills in geometric diagram creation
NEXT STEPS
  • Explore the TikZ and PGF Manual for advanced vector diagram techniques
  • Learn how to implement color schemes in TikZ diagrams
  • Research the use of the [shorten] option for arrow adjustments in TikZ
  • Practice creating complex diagrams using TikZ templates and libraries
USEFUL FOR

This discussion is beneficial for LaTeX users, graphic designers, and educators looking to enhance their skills in creating vector diagrams using TikZ.

I like Serena
Science Advisor
Homework Helper
MHB
Messages
16,335
Reaction score
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.
 
Physics news on Phys.org
\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? :)​
 
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.​
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • Poll Poll
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 67 ·
3
Replies
67
Views
15K
Replies
10
Views
3K