Tag Info

New answers tagged

4

Here are some of the pictures from my master thesis. The topic were transmission and reflexion of (sound) waves at the open end of a tube. All images are made with TikZ and pgfplots. Many thanks to Christian Feuersänger for showing how to do the wave shadings! All images are shown in one document, which I split in parts for this answer. To compile it on ...


6

A parameter varying hyperboloid. \documentclass[pstricks,border=0pt]{standalone} \usepackage{pst-solides3d} %%%%%%%%%%%%%%%%%% \begin{document} \psset{unit=.15\columnwidth,viewpoint=10 45 25 rtp2xyz,linewidth=.4pt,Decran=10,lightsrc=3 2 5,lightintensity=2} \def\l{1} \multido{\r=0+0.051579}{20}{ \begin{pspicture}(-3,-3)(3,3) \def\h{.99999 \r\space sub} ...


6

Use 3d coordinate system from TiKZ. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \draw[fill=gray,opacity=.5] (0,0,0) coordinate (a1) --(0,2,0) coordinate (a2) --(2,0,0) coordinate(a3) --cycle; \draw[fill=blue!20!gray,opacity=.5,dashed] (0,0,-4) coordinate(b1) --(0,2,-4) coordinate(b2) --(2,0,-4) coordinate(b3) --cycle; ...


8

You could always fake your own perspective with a custom coordinate system: \documentclass[tikz, border=5]{standalone} \tikzset{% 3d/.unknown/.code={% \ifx\cx\relax% \let\cx=\pgfkeyscurrentname% \else% \ifx\cy\relax% \let\cy=\pgfkeyscurrentname% \else% \let\cz=\pgfkeyscurrentname% \fi% \fi% } ...


13

This is one possibility via tikz-3dplot Code \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{shapes,calc,positioning} \tdplotsetmaincoords{70}{120} \begin{document} \begin{tikzpicture}[scale=2, tdplot_main_coords,axis/.style={->,dashed},thick] % -- remove these 3 lines if no axis is preferred \draw[axis] (-4, 0, 0) ...


8

Here is a tkz-euclide approach: \documentclass[border=2mm]{standalone} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture} \tkzDefPoint(0,1){A} \tkzDefPoint(5,2){A'} \tkzDefPoint(3,0){B} \tkzDefPoint(0,2){C} \tkzDefPointsBy[translation= from A to A'](B,C){} \tkzFillPolygon[draw,thick,gray!50,rounded corners = 0.5pt](A,B,B',A') ...


10

Here is a simple attempt. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \coordinate (P1) at (0,2); \coordinate (P2) at (5,0); \coordinate (P3) at (0,4); \begin{scope}[shift={(8,2.5)}] \coordinate (Q1) at (0,2); \coordinate (Q2) at (5,0); \coordinate (Q3) at (0,4); \end{scope} %\draw (P1) -- (P2) -- (P3); ...


1

You can do this neatly in Metapost using the center operator, which returns a pair representing the center of the bbox of a given path. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); pair apex; numeric u, alpha; path rectangle[]; u = 1cm; apex = (3u, -5u); alpha = 53; % angle between the two legs rectangle0 = unitsquare shifted 1/2 ...


0

A PSTricks solution: \documentclass{article} \usepackage{pstricks} \begin{document} \psset{fillstyle = solid} \begin{pspicture}(6.2,6.52) \rput{115}(3.23,0.18){\psframe[fillcolor = yellow!60](0,0)(7,0.3)} \rput{65}(3.23,0.05){\psframe[fillcolor = yellow!60](0,0)(7,0.3)} \pscircle[fillcolor = black](3.1,0.12){0.15} \psframe[fillcolor = ...


2

Instead of rectangles you can draw rectangular nodes and make reference to thier center anchors. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \draw[thin,gray] (0,0) node[above] {(0,0)} grid (6,-6) node[below] {(6,-6)}; \node[draw, thick, fill=yellow!40, minimum height=5cm, minimum width=2mm, inner sep=0pt, outer ...


2

Simply define two coordinates a and b, then draw a line with desired thickness. Change the pos value as you wish. \documentclass[tikz,border=5]{standalone} \begin{document} \begin{tikzpicture} \draw[thick] (0,0) -- (6,0); \draw[thick,fill=yellow!40, rotate around={26.5:(3.1,-5)}] (3,0) rectangle (3.2,-5)coordinate[pos=0.5](a); ...


1

You can apply the same rotation to the centers of the non-rotated rectangle. In other words, the center of the non-rotated rectangles would be (3.1,-2.5). Hence the centers of the rotated rectangles are: ([rotate around={26.5:(3.1,-5)}]3.1,-2.5) and ([rotate around={-26.5:(3.1,-5)}]3.1,-2.5) Connecting these points yields: I have ...



Top 50 recent answers are included