The circuit includes components like an optical waveguide, optical fiber, optical ring resonator, photodiode, optical modulator, and photonic crystal. I would like to create the diagram without annotations or arrows—just the shapes representing the components.
I previously received your help on a similar design, and I tried to adapt the code they provided for my current schematic. However, I’m having trouble replicating the layout and level of detail.
\documentclass[10pt,border=3mm,tikz]{standalone}
\usetikzlibrary{shapes, arrows, calc, 3d}
\begin{document}
\begin{tikzpicture}
% Define colors
\definecolor{myblue}{HTML}{2E7CAA}
\definecolor{myred}{HTML}{E72B22}
\definecolor{mygreen}{HTML}{5DA429}
\definecolor{mypurple}{HTML}{C29DE5}
\definecolor{mygray}{HTML}{D1D6D9}
% Optical fiber
\draw[fill=mygray] (0,0) rectangle (0.8,0.4);
\draw[fill=white] (0.3,0.1) rectangle (0.5,0.3);
% Optical waveguide (horizontal)
\draw[fill=myblue] (0.8,0.15) rectangle (5,0.25);
% Laser
\draw[fill=myred] (5,0.25) rectangle (6,0.75);
% Optical ring resonator
\draw[thick,fill=mygreen] (3,1.2) circle (0.5);
% Photonic crystal
\draw[fill=mypurple] (1,1.5) rectangle (2,2);
% Photodiode
\draw[fill=mygreen] (0.5,2) rectangle (1.5,2.5);
% Optical modulator
\draw[fill=myblue] (4.5,1) rectangle (5.5,1.5);
% Input coupler (approximation as a square)
\draw[fill=myred] (4.5,2) rectangle (5.2,2.7);
\end{tikzpicture}
\end{document}
I’ve been unable to replicate the precise layout and positioning of the components. Could you provide any guidance on how to draw smooth paths for the waveguides and connections between components? I’d appreciate any help or advice on how to take this diagram closer to the original!
tikz
is great for schematics, but it is bad for both realism and 3d generally. of course, it can be done, but that doesn't make it a sensible approach.