Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What would be the best practice approach to typeset the Triforce symbol known from the Nintendo® Zelda™ series?

share|improve this question
1  
For those who aren't familiar with Zelda, see en.wikipedia.org/wiki/Triforce. I imagine there's some TikZ involved. –  Clarinetist Jul 14 at 15:18
17  
Newfags can't triforce in LaTeX? ▲ ▲ ▲ –  Clément Jul 14 at 15:19
11  
Easy. Draw a Sierpinski Triangle, but stop before you've finished. –  Seamus Jul 14 at 15:38
5  
This question combined with your avatar... it's just too much. –  Chaosed0 Jul 14 at 17:53
1  
I wish this tune could be the default sound action when an answer is selected. :) –  Paulo Cereda Jul 15 at 10:14
show 4 more comments

7 Answers 7

A simple tikz solution:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz\fill[yellow]
  (0,0)  -- +(1,0) -- +(60:1) -- cycle
  (1,0)  -- +(1,0) -- +(60:1) -- cycle
  (60:1) -- +(1,0) -- +(60:1) -- cycle
;
\end{document}

Result

share|improve this answer
4  
Your answer also provides an interesting optical illusion (on my screen). If I stare at the graphic, I see a bright yellow color. But if I move my gaze anywhere else, the graphic color goes to a dimmer color, until I refix my gaze on the graphic. –  Steven B. Segletes Jul 14 at 20:19
    
+1 for the - by far - simplest code –  ojdo Jul 14 at 23:09
add comment

Here is a nice shaded TikZ version which you can draw in variable sizes.

You have to call the \triforce macro with one parameter, which is the width of the Triforce, e.g. \triforce{10cm}.

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[svgnames]{xcolor}

\usepackage{tikz}
\usetikzlibrary{shadings, calc}

\colorlet{triforcefilloutercolor}{Gold!50!Yellow}
\colorlet{triforcefillinnercolor}{white!80!triforcefilloutercolor}
\colorlet{triforceoutlineinnercolor}{white}
\colorlet{triforceoutlineoutercolor}{Goldenrod}

\tikzset{%
    triforcefillshade/.style={%
        inner color=triforcefillinnercolor,%
        outer color=triforcefilloutercolor%
    },%
    triforceoutlineshade/.style={%
        inner color=triforceoutlineinnercolor,%
        outer color=triforceoutlineoutercolor%
    }%
}

\newcommand{\triforce}[1]{%
    \begin{tikzpicture}%
        \newdimen\triforcewidth%
        \newdimen\triforceheight%
        \triforcewidth=#1%
        \pgfmathparse{sqrt(3)}%
        \pgfmathsetlength{\triforceheight}{\pgfmathresult / 2 * \triforcewidth}%
        %
        \foreach \x / \y in {0 / 0, 0.5\triforcewidth / 0, 0.25\triforcewidth / 0.5\triforceheight}%
        {%
            \shade[triforcefillshade, xshift=\x, yshift=\y]%
                (0, 0)  -- +(.5\triforcewidth, 0) -- +(60:.5\triforcewidth) -- cycle;%
            \shade[triforceoutlineshade, xshift=\x, yshift=\y]%
                (0, 0)  -- +(.5\triforcewidth, 0) -- +(60:.5\triforcewidth) -- cycle%
                (30:.0175\triforcewidth) -- ($(60:.5\triforcewidth) + (-90:.0175\triforcewidth)$) -- ($(0.5\triforcewidth, 0) + (150:.0175\triforcewidth)$) -- cycle;%
        }%
    \end{tikzpicture}%
}

\begin{document}
\triforce{10cm}
\end{document}
share|improve this answer
    
Hmm, I think I like this the most, because it looks pretty much like the logo on Wikipedia. I suppose I can use things like 1em as width to make this fit into a line of text, right? –  polemon Jul 15 at 12:41
1  
@polemon I don't think it will look as good in such a small size. Perhaps you would be better off using Heiko's answer colored black and put in a resizebox with a size of 1em. –  szantaii Jul 15 at 17:18
add comment

With stacks. The top one is a simple stack of \TriangleUp symbols, whereas the bottom one uses a shrunken \stackinset upon the same, to achieve a border, as shown on the wiki reference.

\documentclass{article}
\usepackage{stackengine,xcolor,bbding,graphicx}
\def\LTri{\stackinset{c}{}{c}{-.2pt}{\scalebox{.85}
  {\textcolor{yellow!20}{\TriangleUp}}}
  {\textcolor{yellow}{\TriangleUp}}}
\begin{document}
\textcolor{yellow}{\stackon[0pt]{\TriangleUp\TriangleUp}{\TriangleUp}}

\stackon[0pt]{\LTri\LTri}{\LTri}
\end{document}

enter image description here

share|improve this answer
add comment

Compile with XeLaTex :

\documentclass{article}
\usepackage{pifont}
\usepackage{color}
\begin{document}
I can triforce !

\noindent
~~\ding{115}\\
\ding{115}~\ding{115}

Even in yellow:

\color{yellow}{
\noindent
~~\ding{115}\\
\ding{115}~\ding{115}
}
\end{document}

I can triforce !

share|improve this answer
    
You can't triforce! ;) –  klingt.net Jul 15 at 13:35
    
I like this solution the best –  Jonathan Landrum Jul 15 at 15:29
2  
@JonathanLandrum : I think it is more in the spirit of the forum triforce ! The one by @klingt.net is nice, too. –  Clément Jul 15 at 15:31
1  
It's certainly in the spirit of the "I can triforce" meme –  Jonathan Landrum Jul 15 at 15:31
add comment

Just for fun, with pict2e:

\documentclass{standalone}
\usepackage{pict2e}
\begin{document}
\begin{picture}(2,1.732050808)
\newsavebox{\tripart}
\savebox{\tripart}{\moveto(0,0)\lineto(1,0)\lineto(0.5,0.866025404)\closepath\fillpath}
\put(0,0){\usebox{\tripart}}
\put(1,0){\usebox{\tripart}}
\put(0.5,0.866025404){\usebox{\tripart}}
\end{picture}
\end{document}

enter image description here

share|improve this answer
add comment

Only with amssymb

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}

\begin{document}
\Huge%
\hspace{-8pt}$\blacktriangle$\vspace{-15pt}\\
$\blacktriangle$\hspace{-4pt}$\blacktriangle$
\end{document}

enter image description here

share|improve this answer
add comment

Based on Heiko Oberdiek's answer, there is --- just for the fun --- an even simpler drawing with TiKz.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[yellow] (0,0)  -- +(2,0) -- +(60:2) -- cycle;
\fill[white]  (60:1) -- +(1,0)  -- (1,0) -- cycle;
\end{tikzpicture}
\end{document}

Below the drawing with [blue!05] instead of [white], just to mess with Steven B. Segletes's screen.

Another triforce

And to get a "triforce symbol logo of 1em height", as szantaii suggests :

\documentclass{article}
\usepackage{tikz}
\newcommand{\triforce}{\resizebox{1em}{!}{
\begin{tikzpicture}
\fill[black] (0,0)  -- +(2,0) -- +(60:2) -- cycle;
\fill[white]  (60:1) -- +(1,0)  -- (1,0) -- cycle;
\end{tikzpicture}
}}
\begin{document}
I'd like to introduce the \triforce{} symbol.
\end{document}

I'd like to introduce the triforce symbol

share|improve this answer
    
Strictly speaking, Oberdiek's answer is more correct, because of the lack of "white-out". This is most evident when the output is in PNG format. –  bug Jul 17 at 6:02
    
@Clément I agree with bug's comment. Try using path clipping combined with TikZ's even odd rule instead of white filling the unnecessary area. See section 15.9 Clipping and Fading (Soft Clipping) in the TikZ & PGF manual (version 3.0.0). Example: \begin{tikzpicture}[even odd rule] \clip (0, 0) -- +(2, 0) -- +(60:2) -- cycle (1, 0) -- +(60:1) -- +(120:1) -- cycle; \fill (0, 0) -- +(2, 0) -- +(60:2) -- cycle; \end{tikzpicture}. –  szantaii Jul 17 at 9:35
    
You are both right. This is a community wiki, feel free to edit! –  Clément Jul 17 at 11:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.