Welcoming 2019 Pi day: How to draw the letter π?
How to draw the letter π not in the standard way (i.e.
pi
)?
I mean "draw", not "type"! Today there will be no pi
, but there will be something like this
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (0,2)--(3,2);
draw (1,0)--(1,2);
draw (2,0)--(2,2);
end{tikzpicture}
end{document}
(inspired by David Carlisle – I draw this in TikZ just because I don't know how to use picture
;))
Or this
documentclass[tikz]{standalone}
usepackage{tikzducks}
begin{document}
begin{tikzpicture}
duck
duck[xshift=1cm,yshift=2cm]
duck[xshift=1cm,yshift=4cm]
duck[xshift=1cm,yshift=6cm]
duck[xshift=0cm,yshift=8cm]
duck[xshift=-2cm,yshift=7.5cm]
duck[xshift=2cm,yshift=8cm]
duck[xshift=4cm,yshift=8cm]
duck[xshift=6cm,yshift=8cm]
duck[xshift=8cm,yshift=8cm]
duck[xshift=5cm,yshift=6cm]
duck[xshift=5cm,yshift=4cm]
duck[xshift=5.5cm,yshift=2cm]
duck[xshift=6.5cm,yshift=0cm]
duck[xshift=8cm,yshift=1cm]
node[font=huge] at (4,11) {Happy $pi$ day with verb|tikzducks|!};
end{tikzpicture}
end{document}
They are my proudest π drawings, and as today is Pi day, I'd like to see yours!
tikz-pgf fun tikzducks picture-mode tikzlings
add a comment |
How to draw the letter π not in the standard way (i.e.
pi
)?
I mean "draw", not "type"! Today there will be no pi
, but there will be something like this
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (0,2)--(3,2);
draw (1,0)--(1,2);
draw (2,0)--(2,2);
end{tikzpicture}
end{document}
(inspired by David Carlisle – I draw this in TikZ just because I don't know how to use picture
;))
Or this
documentclass[tikz]{standalone}
usepackage{tikzducks}
begin{document}
begin{tikzpicture}
duck
duck[xshift=1cm,yshift=2cm]
duck[xshift=1cm,yshift=4cm]
duck[xshift=1cm,yshift=6cm]
duck[xshift=0cm,yshift=8cm]
duck[xshift=-2cm,yshift=7.5cm]
duck[xshift=2cm,yshift=8cm]
duck[xshift=4cm,yshift=8cm]
duck[xshift=6cm,yshift=8cm]
duck[xshift=8cm,yshift=8cm]
duck[xshift=5cm,yshift=6cm]
duck[xshift=5cm,yshift=4cm]
duck[xshift=5.5cm,yshift=2cm]
duck[xshift=6.5cm,yshift=0cm]
duck[xshift=8cm,yshift=1cm]
node[font=huge] at (4,11) {Happy $pi$ day with verb|tikzducks|!};
end{tikzpicture}
end{document}
They are my proudest π drawings, and as today is Pi day, I'd like to see yours!
tikz-pgf fun tikzducks picture-mode tikzlings
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still seedocumentclass
,begin
,draw
,tikz
,linespread
, ...; the output is all nice anyway, and I like all the solutions here.
– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago
add a comment |
How to draw the letter π not in the standard way (i.e.
pi
)?
I mean "draw", not "type"! Today there will be no pi
, but there will be something like this
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (0,2)--(3,2);
draw (1,0)--(1,2);
draw (2,0)--(2,2);
end{tikzpicture}
end{document}
(inspired by David Carlisle – I draw this in TikZ just because I don't know how to use picture
;))
Or this
documentclass[tikz]{standalone}
usepackage{tikzducks}
begin{document}
begin{tikzpicture}
duck
duck[xshift=1cm,yshift=2cm]
duck[xshift=1cm,yshift=4cm]
duck[xshift=1cm,yshift=6cm]
duck[xshift=0cm,yshift=8cm]
duck[xshift=-2cm,yshift=7.5cm]
duck[xshift=2cm,yshift=8cm]
duck[xshift=4cm,yshift=8cm]
duck[xshift=6cm,yshift=8cm]
duck[xshift=8cm,yshift=8cm]
duck[xshift=5cm,yshift=6cm]
duck[xshift=5cm,yshift=4cm]
duck[xshift=5.5cm,yshift=2cm]
duck[xshift=6.5cm,yshift=0cm]
duck[xshift=8cm,yshift=1cm]
node[font=huge] at (4,11) {Happy $pi$ day with verb|tikzducks|!};
end{tikzpicture}
end{document}
They are my proudest π drawings, and as today is Pi day, I'd like to see yours!
tikz-pgf fun tikzducks picture-mode tikzlings
How to draw the letter π not in the standard way (i.e.
pi
)?
I mean "draw", not "type"! Today there will be no pi
, but there will be something like this
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (0,2)--(3,2);
draw (1,0)--(1,2);
draw (2,0)--(2,2);
end{tikzpicture}
end{document}
(inspired by David Carlisle – I draw this in TikZ just because I don't know how to use picture
;))
Or this
documentclass[tikz]{standalone}
usepackage{tikzducks}
begin{document}
begin{tikzpicture}
duck
duck[xshift=1cm,yshift=2cm]
duck[xshift=1cm,yshift=4cm]
duck[xshift=1cm,yshift=6cm]
duck[xshift=0cm,yshift=8cm]
duck[xshift=-2cm,yshift=7.5cm]
duck[xshift=2cm,yshift=8cm]
duck[xshift=4cm,yshift=8cm]
duck[xshift=6cm,yshift=8cm]
duck[xshift=8cm,yshift=8cm]
duck[xshift=5cm,yshift=6cm]
duck[xshift=5cm,yshift=4cm]
duck[xshift=5.5cm,yshift=2cm]
duck[xshift=6.5cm,yshift=0cm]
duck[xshift=8cm,yshift=1cm]
node[font=huge] at (4,11) {Happy $pi$ day with verb|tikzducks|!};
end{tikzpicture}
end{document}
They are my proudest π drawings, and as today is Pi day, I'd like to see yours!
tikz-pgf fun tikzducks picture-mode tikzlings
tikz-pgf fun tikzducks picture-mode tikzlings
edited 2 hours ago
Henri Menke
76.5k8167282
76.5k8167282
asked 4 hours ago
JouleVJouleV
5,37121242
5,37121242
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still seedocumentclass
,begin
,draw
,tikz
,linespread
, ...; the output is all nice anyway, and I like all the solutions here.
– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago
add a comment |
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still seedocumentclass
,begin
,draw
,tikz
,linespread
, ...; the output is all nice anyway, and I like all the solutions here.
– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still see
documentclass
, begin
, draw
, tikz
, linespread
, ...; the output is all nice anyway, and I like all the solutions here.– user49915
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still see
documentclass
, begin
, draw
, tikz
, linespread
, ...; the output is all nice anyway, and I like all the solutions here.– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago
add a comment |
5 Answers
5
active
oldest
votes
We could extract the MetaPost paths for the glyph pi
from the font and draw it using LuaTeX.
documentclass{article}
usepackage{fontspec}
setmainfont{latinmodern-math.otf}
usepackage{luacode}
begin{luacode*}
-- We need some utilities from ConTeXt
callbacks = callbacks or {}
callbacks.supported = callbacks.supported or {}
CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
dofile(kpse.find_file("util-fmt.lua"))
dofile(kpse.find_file("node-ini.lua"))
dofile(kpse.find_file("font-mps.lua"))
dofile(kpse.find_file("font-shp.lua"))
-- That's a simple reimplemetation of ConTeXt's showshape macro
function outlinepaths(character)
local fontid = font.current()
local shapedata = fonts.hashes.shapes[fontid] -- by index
local chardata = fonts.hashes.characters[fontid] -- by unicode
local shapeglyphs = shapedata.glyphs or { }
character = utf.byte(character)
local c = chardata[character]
if c then
if not c.index then
return {}
end
local glyph = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units = shapedata.units or 1000
local factor = 100/units
local paths = fonts.metapost.paths(glyph,factor)
return paths
end
end
end
end{luacode*}
usepackage{luamplib}
everymplib{beginfig(0);}
everyendmplib{endfig;}
defmpdefineoutlines#1{directlua{
local char = "luaescapestring{#1}"
local outlines = outlinepaths("#1")
for i, path in ipairs(outlines) do
tex.print("fill " .. path .. ";")
end
}}
begin{document}
begin{mplibcode}
mpdefineoutlines{𝜋}
end{mplibcode}
end{document}
Instead of using luamplib
, we could also simply print
the path to the log file and copy it to a MetaPost file. With some additonal formatting we get:
prologues := 3;
outputformat := "pdf";
beginfig(1)
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
endfig;
end
Or you can even use the path with TikZ.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[x=1pt,y=1pt]
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
end{tikzpicture}
end{document}
The output is rather unspectacular.
add a comment |
Writing π with the digits of π - using the verbatim
environment.
documentclass{article}
linespread{0.7}
begin{document}
begin{verbatim}
3.141592653589793238462643383279
5028841971693993751058209749445923
07816406286208998628034825342117067
9821 48086 5132
823 06647 09384
46 09550 58223
17 25359 4081
2848 1117
4502 8410
2701 9385
21105 55964
46229 48954
9303 81964
4288 10975
66593 34461
284756 48233
78678 31652 71
2019091 456485 66
9234603 48610454326648
2133936 0726024914127
3724587 00660631558
817488 152092096
end{verbatim}
end{document}
Based on ascii art drawing by Jorel - https://www.flickr.com/photos/jorel314/3352784321/
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
add a comment |
One should also honor Euler a bit.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikzlings,amsmath}
makeatletter
tikzset{/thing/.cd,
pie/.code=thing@cheesetruedefthing@cheese{#1}, %<-pretend you didn't see that
pie/.default=pink!70!red}
makeatother
begin{document}
begin{tikzpicture}[font=sffamily]
marmot[pie,whiskers,teeth,shadow]
node[anchor=east,scale=5,transform shape] at (-0.6,1) {$picdotmathsf{e}=text{sffamily pie}$};
end{tikzpicture}
end{document}
add a comment |
Happy pi
(less) day!!
documentclass{report}
begin{document}
noindent%
rule{30pt}{1pt}\[-1pt]
rule{8pt}{0pt}%
rule{1pt}{30pt}%
rule{12pt}{0pt}%
rule{1pt}{30pt}
end{document}
add a comment |
The obligatory forest
solution:
documentclass{standalone}
usepackage[edges]{forest}
usetikzlibrary{calc}
forestset{
forked edge'/.style={
edge={rotate/.option=!parent.grow},
edge path'={(!u.parent anchor)++(0pt,-30pt) -- (!u.parent anchor)++(0pt,30pt) |- (.child anchor)},
}
}
begin{document}
Huge
begin{forest}forked edges,for tree={edge={line width=4pt}}
[ [ ] [ ]]
end{forest}
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479395%2fwelcoming-2019-pi-day-how-to-draw-the-letter-%25cf%2580%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
We could extract the MetaPost paths for the glyph pi
from the font and draw it using LuaTeX.
documentclass{article}
usepackage{fontspec}
setmainfont{latinmodern-math.otf}
usepackage{luacode}
begin{luacode*}
-- We need some utilities from ConTeXt
callbacks = callbacks or {}
callbacks.supported = callbacks.supported or {}
CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
dofile(kpse.find_file("util-fmt.lua"))
dofile(kpse.find_file("node-ini.lua"))
dofile(kpse.find_file("font-mps.lua"))
dofile(kpse.find_file("font-shp.lua"))
-- That's a simple reimplemetation of ConTeXt's showshape macro
function outlinepaths(character)
local fontid = font.current()
local shapedata = fonts.hashes.shapes[fontid] -- by index
local chardata = fonts.hashes.characters[fontid] -- by unicode
local shapeglyphs = shapedata.glyphs or { }
character = utf.byte(character)
local c = chardata[character]
if c then
if not c.index then
return {}
end
local glyph = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units = shapedata.units or 1000
local factor = 100/units
local paths = fonts.metapost.paths(glyph,factor)
return paths
end
end
end
end{luacode*}
usepackage{luamplib}
everymplib{beginfig(0);}
everyendmplib{endfig;}
defmpdefineoutlines#1{directlua{
local char = "luaescapestring{#1}"
local outlines = outlinepaths("#1")
for i, path in ipairs(outlines) do
tex.print("fill " .. path .. ";")
end
}}
begin{document}
begin{mplibcode}
mpdefineoutlines{𝜋}
end{mplibcode}
end{document}
Instead of using luamplib
, we could also simply print
the path to the log file and copy it to a MetaPost file. With some additonal formatting we get:
prologues := 3;
outputformat := "pdf";
beginfig(1)
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
endfig;
end
Or you can even use the path with TikZ.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[x=1pt,y=1pt]
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
end{tikzpicture}
end{document}
The output is rather unspectacular.
add a comment |
We could extract the MetaPost paths for the glyph pi
from the font and draw it using LuaTeX.
documentclass{article}
usepackage{fontspec}
setmainfont{latinmodern-math.otf}
usepackage{luacode}
begin{luacode*}
-- We need some utilities from ConTeXt
callbacks = callbacks or {}
callbacks.supported = callbacks.supported or {}
CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
dofile(kpse.find_file("util-fmt.lua"))
dofile(kpse.find_file("node-ini.lua"))
dofile(kpse.find_file("font-mps.lua"))
dofile(kpse.find_file("font-shp.lua"))
-- That's a simple reimplemetation of ConTeXt's showshape macro
function outlinepaths(character)
local fontid = font.current()
local shapedata = fonts.hashes.shapes[fontid] -- by index
local chardata = fonts.hashes.characters[fontid] -- by unicode
local shapeglyphs = shapedata.glyphs or { }
character = utf.byte(character)
local c = chardata[character]
if c then
if not c.index then
return {}
end
local glyph = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units = shapedata.units or 1000
local factor = 100/units
local paths = fonts.metapost.paths(glyph,factor)
return paths
end
end
end
end{luacode*}
usepackage{luamplib}
everymplib{beginfig(0);}
everyendmplib{endfig;}
defmpdefineoutlines#1{directlua{
local char = "luaescapestring{#1}"
local outlines = outlinepaths("#1")
for i, path in ipairs(outlines) do
tex.print("fill " .. path .. ";")
end
}}
begin{document}
begin{mplibcode}
mpdefineoutlines{𝜋}
end{mplibcode}
end{document}
Instead of using luamplib
, we could also simply print
the path to the log file and copy it to a MetaPost file. With some additonal formatting we get:
prologues := 3;
outputformat := "pdf";
beginfig(1)
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
endfig;
end
Or you can even use the path with TikZ.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[x=1pt,y=1pt]
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
end{tikzpicture}
end{document}
The output is rather unspectacular.
add a comment |
We could extract the MetaPost paths for the glyph pi
from the font and draw it using LuaTeX.
documentclass{article}
usepackage{fontspec}
setmainfont{latinmodern-math.otf}
usepackage{luacode}
begin{luacode*}
-- We need some utilities from ConTeXt
callbacks = callbacks or {}
callbacks.supported = callbacks.supported or {}
CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
dofile(kpse.find_file("util-fmt.lua"))
dofile(kpse.find_file("node-ini.lua"))
dofile(kpse.find_file("font-mps.lua"))
dofile(kpse.find_file("font-shp.lua"))
-- That's a simple reimplemetation of ConTeXt's showshape macro
function outlinepaths(character)
local fontid = font.current()
local shapedata = fonts.hashes.shapes[fontid] -- by index
local chardata = fonts.hashes.characters[fontid] -- by unicode
local shapeglyphs = shapedata.glyphs or { }
character = utf.byte(character)
local c = chardata[character]
if c then
if not c.index then
return {}
end
local glyph = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units = shapedata.units or 1000
local factor = 100/units
local paths = fonts.metapost.paths(glyph,factor)
return paths
end
end
end
end{luacode*}
usepackage{luamplib}
everymplib{beginfig(0);}
everyendmplib{endfig;}
defmpdefineoutlines#1{directlua{
local char = "luaescapestring{#1}"
local outlines = outlinepaths("#1")
for i, path in ipairs(outlines) do
tex.print("fill " .. path .. ";")
end
}}
begin{document}
begin{mplibcode}
mpdefineoutlines{𝜋}
end{mplibcode}
end{document}
Instead of using luamplib
, we could also simply print
the path to the log file and copy it to a MetaPost file. With some additonal formatting we get:
prologues := 3;
outputformat := "pdf";
beginfig(1)
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
endfig;
end
Or you can even use the path with TikZ.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[x=1pt,y=1pt]
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
end{tikzpicture}
end{document}
The output is rather unspectacular.
We could extract the MetaPost paths for the glyph pi
from the font and draw it using LuaTeX.
documentclass{article}
usepackage{fontspec}
setmainfont{latinmodern-math.otf}
usepackage{luacode}
begin{luacode*}
-- We need some utilities from ConTeXt
callbacks = callbacks or {}
callbacks.supported = callbacks.supported or {}
CONTEXTLMTXMODE = CONTEXTLMTXMODE or (status.obj_ptr == nil and 2 or 1)
dofile(kpse.find_file("util-fmt.lua"))
dofile(kpse.find_file("node-ini.lua"))
dofile(kpse.find_file("font-mps.lua"))
dofile(kpse.find_file("font-shp.lua"))
-- That's a simple reimplemetation of ConTeXt's showshape macro
function outlinepaths(character)
local fontid = font.current()
local shapedata = fonts.hashes.shapes[fontid] -- by index
local chardata = fonts.hashes.characters[fontid] -- by unicode
local shapeglyphs = shapedata.glyphs or { }
character = utf.byte(character)
local c = chardata[character]
if c then
if not c.index then
return {}
end
local glyph = shapeglyphs[c.index]
if glyph and (glyph.segments or glyph.sequence) then
local units = shapedata.units or 1000
local factor = 100/units
local paths = fonts.metapost.paths(glyph,factor)
return paths
end
end
end
end{luacode*}
usepackage{luamplib}
everymplib{beginfig(0);}
everyendmplib{endfig;}
defmpdefineoutlines#1{directlua{
local char = "luaescapestring{#1}"
local outlines = outlinepaths("#1")
for i, path in ipairs(outlines) do
tex.print("fill " .. path .. ";")
end
}}
begin{document}
begin{mplibcode}
mpdefineoutlines{𝜋}
end{mplibcode}
end{document}
Instead of using luamplib
, we could also simply print
the path to the log file and copy it to a MetaPost file. With some additonal formatting we get:
prologues := 3;
outputformat := "pdf";
beginfig(1)
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
endfig;
end
Or you can even use the path with TikZ.
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}[x=1pt,y=1pt]
fill (56.70,40.70)
.. controls (56.70,43.10) and (54.60,43.10)
.. (52.70,43.10)
-- (19.20,43.10)
.. controls (17,43.10) and (13.20,43.10)
.. (8.80,38.40)
.. controls (5.30,34.50) and (2.70,29.90)
.. (2.70,29.40)
.. controls (2.70,29.40) and (2.70,28.40)
.. (3.90,28.40)
.. controls (4.70,28.40) and (4.90,28.80)
.. (5.50,29.60)
.. controls (10.40,37.30) and (16.20,37.30)
.. (18.20,37.30)
-- (23.90,37.30)
.. controls (20.70,25.20) and (15.30,13.10)
.. (11.10,4)
.. controls (10.30,2.50) and (10.30,2.30)
.. (10.30,1.60)
.. controls (10.30,-0.30) and (11.90,-1.10)
.. (13.20,-1.10)
.. controls (16.20,-1.10) and (17,1.70)
.. (18.20,5.40)
.. controls (19.60,10) and (19.60,10.20)
.. (20.90,15.20)
-- (26.50,37.30)
-- (37.80,37.30)
.. controls (34.50,22.50) and (33.60,18.20)
.. (33.60,11.50)
.. controls (33.60,10) and (33.60,7.30)
.. (34.40,3.90)
.. controls (35.40,-0.50) and (36.50,-1.10)
.. (38,-1.10)
.. controls (40,-1.10) and (42.10,0.70)
.. (42.10,2.70)
.. controls (42.10,3.30) and (42.10,3.50)
.. (41.50,4.90)
.. controls (38.60,12.10) and (38.60,18.60)
.. (38.60,21.40)
.. controls (38.60,26.70) and (39.30,32.10)
.. (40.40,37.30)
-- (51.80,37.30)
.. controls (53.10,37.30) and (56.70,37.30)
.. (56.70,40.70)
-- cycle;
end{tikzpicture}
end{document}
The output is rather unspectacular.
edited 1 hour ago
answered 2 hours ago
Henri MenkeHenri Menke
76.5k8167282
76.5k8167282
add a comment |
add a comment |
Writing π with the digits of π - using the verbatim
environment.
documentclass{article}
linespread{0.7}
begin{document}
begin{verbatim}
3.141592653589793238462643383279
5028841971693993751058209749445923
07816406286208998628034825342117067
9821 48086 5132
823 06647 09384
46 09550 58223
17 25359 4081
2848 1117
4502 8410
2701 9385
21105 55964
46229 48954
9303 81964
4288 10975
66593 34461
284756 48233
78678 31652 71
2019091 456485 66
9234603 48610454326648
2133936 0726024914127
3724587 00660631558
817488 152092096
end{verbatim}
end{document}
Based on ascii art drawing by Jorel - https://www.flickr.com/photos/jorel314/3352784321/
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
add a comment |
Writing π with the digits of π - using the verbatim
environment.
documentclass{article}
linespread{0.7}
begin{document}
begin{verbatim}
3.141592653589793238462643383279
5028841971693993751058209749445923
07816406286208998628034825342117067
9821 48086 5132
823 06647 09384
46 09550 58223
17 25359 4081
2848 1117
4502 8410
2701 9385
21105 55964
46229 48954
9303 81964
4288 10975
66593 34461
284756 48233
78678 31652 71
2019091 456485 66
9234603 48610454326648
2133936 0726024914127
3724587 00660631558
817488 152092096
end{verbatim}
end{document}
Based on ascii art drawing by Jorel - https://www.flickr.com/photos/jorel314/3352784321/
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
add a comment |
Writing π with the digits of π - using the verbatim
environment.
documentclass{article}
linespread{0.7}
begin{document}
begin{verbatim}
3.141592653589793238462643383279
5028841971693993751058209749445923
07816406286208998628034825342117067
9821 48086 5132
823 06647 09384
46 09550 58223
17 25359 4081
2848 1117
4502 8410
2701 9385
21105 55964
46229 48954
9303 81964
4288 10975
66593 34461
284756 48233
78678 31652 71
2019091 456485 66
9234603 48610454326648
2133936 0726024914127
3724587 00660631558
817488 152092096
end{verbatim}
end{document}
Based on ascii art drawing by Jorel - https://www.flickr.com/photos/jorel314/3352784321/
Writing π with the digits of π - using the verbatim
environment.
documentclass{article}
linespread{0.7}
begin{document}
begin{verbatim}
3.141592653589793238462643383279
5028841971693993751058209749445923
07816406286208998628034825342117067
9821 48086 5132
823 06647 09384
46 09550 58223
17 25359 4081
2848 1117
4502 8410
2701 9385
21105 55964
46229 48954
9303 81964
4288 10975
66593 34461
284756 48233
78678 31652 71
2019091 456485 66
9234603 48610454326648
2133936 0726024914127
3724587 00660631558
817488 152092096
end{verbatim}
end{document}
Based on ascii art drawing by Jorel - https://www.flickr.com/photos/jorel314/3352784321/
edited 3 hours ago
answered 3 hours ago
MiloMilo
6,43221650
6,43221650
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
add a comment |
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
How did you format the code? By trial/error?
– Sigur
3 hours ago
How did you format the code? By trial/error?
– Sigur
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
@Sigur I did it by hand, but based off an ascii art drawing I found online. Added a reference to the original drawing.
– Milo
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
Nice. Though, not quite: you simply draw it rather than computing it :-).
– user49915
3 hours ago
add a comment |
One should also honor Euler a bit.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikzlings,amsmath}
makeatletter
tikzset{/thing/.cd,
pie/.code=thing@cheesetruedefthing@cheese{#1}, %<-pretend you didn't see that
pie/.default=pink!70!red}
makeatother
begin{document}
begin{tikzpicture}[font=sffamily]
marmot[pie,whiskers,teeth,shadow]
node[anchor=east,scale=5,transform shape] at (-0.6,1) {$picdotmathsf{e}=text{sffamily pie}$};
end{tikzpicture}
end{document}
add a comment |
One should also honor Euler a bit.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikzlings,amsmath}
makeatletter
tikzset{/thing/.cd,
pie/.code=thing@cheesetruedefthing@cheese{#1}, %<-pretend you didn't see that
pie/.default=pink!70!red}
makeatother
begin{document}
begin{tikzpicture}[font=sffamily]
marmot[pie,whiskers,teeth,shadow]
node[anchor=east,scale=5,transform shape] at (-0.6,1) {$picdotmathsf{e}=text{sffamily pie}$};
end{tikzpicture}
end{document}
add a comment |
One should also honor Euler a bit.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikzlings,amsmath}
makeatletter
tikzset{/thing/.cd,
pie/.code=thing@cheesetruedefthing@cheese{#1}, %<-pretend you didn't see that
pie/.default=pink!70!red}
makeatother
begin{document}
begin{tikzpicture}[font=sffamily]
marmot[pie,whiskers,teeth,shadow]
node[anchor=east,scale=5,transform shape] at (-0.6,1) {$picdotmathsf{e}=text{sffamily pie}$};
end{tikzpicture}
end{document}
One should also honor Euler a bit.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{tikzlings,amsmath}
makeatletter
tikzset{/thing/.cd,
pie/.code=thing@cheesetruedefthing@cheese{#1}, %<-pretend you didn't see that
pie/.default=pink!70!red}
makeatother
begin{document}
begin{tikzpicture}[font=sffamily]
marmot[pie,whiskers,teeth,shadow]
node[anchor=east,scale=5,transform shape] at (-0.6,1) {$picdotmathsf{e}=text{sffamily pie}$};
end{tikzpicture}
end{document}
answered 3 hours ago
marmotmarmot
108k5132249
108k5132249
add a comment |
add a comment |
Happy pi
(less) day!!
documentclass{report}
begin{document}
noindent%
rule{30pt}{1pt}\[-1pt]
rule{8pt}{0pt}%
rule{1pt}{30pt}%
rule{12pt}{0pt}%
rule{1pt}{30pt}
end{document}
add a comment |
Happy pi
(less) day!!
documentclass{report}
begin{document}
noindent%
rule{30pt}{1pt}\[-1pt]
rule{8pt}{0pt}%
rule{1pt}{30pt}%
rule{12pt}{0pt}%
rule{1pt}{30pt}
end{document}
add a comment |
Happy pi
(less) day!!
documentclass{report}
begin{document}
noindent%
rule{30pt}{1pt}\[-1pt]
rule{8pt}{0pt}%
rule{1pt}{30pt}%
rule{12pt}{0pt}%
rule{1pt}{30pt}
end{document}
Happy pi
(less) day!!
documentclass{report}
begin{document}
noindent%
rule{30pt}{1pt}\[-1pt]
rule{8pt}{0pt}%
rule{1pt}{30pt}%
rule{12pt}{0pt}%
rule{1pt}{30pt}
end{document}
edited 4 hours ago
answered 4 hours ago
SigurSigur
25.9k457140
25.9k457140
add a comment |
add a comment |
The obligatory forest
solution:
documentclass{standalone}
usepackage[edges]{forest}
usetikzlibrary{calc}
forestset{
forked edge'/.style={
edge={rotate/.option=!parent.grow},
edge path'={(!u.parent anchor)++(0pt,-30pt) -- (!u.parent anchor)++(0pt,30pt) |- (.child anchor)},
}
}
begin{document}
Huge
begin{forest}forked edges,for tree={edge={line width=4pt}}
[ [ ] [ ]]
end{forest}
end{document}
add a comment |
The obligatory forest
solution:
documentclass{standalone}
usepackage[edges]{forest}
usetikzlibrary{calc}
forestset{
forked edge'/.style={
edge={rotate/.option=!parent.grow},
edge path'={(!u.parent anchor)++(0pt,-30pt) -- (!u.parent anchor)++(0pt,30pt) |- (.child anchor)},
}
}
begin{document}
Huge
begin{forest}forked edges,for tree={edge={line width=4pt}}
[ [ ] [ ]]
end{forest}
end{document}
add a comment |
The obligatory forest
solution:
documentclass{standalone}
usepackage[edges]{forest}
usetikzlibrary{calc}
forestset{
forked edge'/.style={
edge={rotate/.option=!parent.grow},
edge path'={(!u.parent anchor)++(0pt,-30pt) -- (!u.parent anchor)++(0pt,30pt) |- (.child anchor)},
}
}
begin{document}
Huge
begin{forest}forked edges,for tree={edge={line width=4pt}}
[ [ ] [ ]]
end{forest}
end{document}
The obligatory forest
solution:
documentclass{standalone}
usepackage[edges]{forest}
usetikzlibrary{calc}
forestset{
forked edge'/.style={
edge={rotate/.option=!parent.grow},
edge path'={(!u.parent anchor)++(0pt,-30pt) -- (!u.parent anchor)++(0pt,30pt) |- (.child anchor)},
}
}
begin{document}
Huge
begin{forest}forked edges,for tree={edge={line width=4pt}}
[ [ ] [ ]]
end{forest}
end{document}
answered 1 hour ago
Alan MunnAlan Munn
162k28432709
162k28432709
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479395%2fwelcoming-2019-pi-day-how-to-draw-the-letter-%25cf%2580%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Beat this one: ioccc.org/1989/roemer.c
– user49915
3 hours ago
@user49915 I don't think we can have the output and the code being exactly the same :))
– JouleV
3 hours ago
Though, I guess, a really useful one would be a sans-serif normalfont upright math capital Pi with xelatex and OTF fonts. You may ask "why", and the answer would be "since it's not a part of Unicode". As for for useless ones, I still see
documentclass
,begin
,draw
,tikz
,linespread
, ...; the output is all nice anyway, and I like all the solutions here.– user49915
3 hours ago
You can probably have the code and the output close enough; you only have to pepper the Makefile compiling the code by suitable awk or sed scripts. In theory, you can have them exactly the same, since tex is Turing-complete (en.wikipedia.org/wiki/Quine_(computing)), but it's unlikely to print Pi in any sense of the word.
– user49915
3 hours ago
Stephen Hawking passed away 1 year ago.
– The Inventor of God
4 mins ago