i need to draw circuits and diagrams
play

I need to draw circuits and diagrams! Orestes Mas - PowerPoint PPT Presentation

Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd February 2020 , FOSDEM 20 Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd


  1. Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd February 2020 , FOSDEM 20

  2. Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) Polytechnic University of Catalonia 2nd February 2020 , FOSDEM 20

  3. The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  4. The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  5. The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  6. The problem I need to draw circuits and diagrams! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  7. 2nd February 2020 + Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC 𝑗 2 𝑗 1 π‘Š 𝑑𝑑 + 𝑗 𝑐 𝑆 𝑐 𝑀 𝛿 + βˆ’ 𝑆 𝑑 𝑀 𝑦 βˆ’ 𝛾𝑗 𝑐 𝑆 𝑓 𝑆 𝑐 , 𝑀 𝛿 , 𝑗 2 , 𝛾𝑗 𝑐 symbols Requirements we have Why PyCirkuit? β–Ά Beautiful ( publishing quality ) β–Ά Large library of predefined β–Ά Uniform style (don’t mix libraries) β–Ά Parametrizable symbols β–Ά Consistent typography : β–Ά Free formats, tools and systems , FOSDEM 20

  8. 2nd February 2020 + Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC 𝑗 2 𝑗 1 π‘Š 𝑑𝑑 + 𝑗 𝑐 𝑆 𝑐 𝑀 𝛿 + βˆ’ 𝑆 𝑑 𝑀 𝑦 βˆ’ 𝛾𝑗 𝑐 𝑆 𝑓 𝑆 𝑐 , 𝑀 𝛿 , 𝑗 2 , 𝛾𝑗 𝑐 symbols Requirements we have Why PyCirkuit? β–Ά Beautiful ( publishing quality ) β–Ά Large library of predefined β–Ά Uniform style (don’t mix libraries) β–Ά Parametrizable symbols β–Ά Consistent typography : β–Ά Free formats, tools and systems , FOSDEM 20

  9. 2nd February 2020 𝑓 π‘˜90∘ Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC problems EX+ Ti k Z ! T A L 𝑓 π‘˜330∘ 𝑓 π‘˜300∘ 𝑓 π‘˜270∘ 𝑓 π‘˜240∘ 𝑓 π‘˜210∘ 𝑓 π‘˜180∘ 𝑓 π‘˜120∘ 𝑓 π‘˜150∘ 𝑓 π‘˜60∘ 𝑓 π‘˜30∘ 𝑓 π‘˜0∘ Chosen solution Insert graphic commands into a L A T EX document \begin {tikzpicture} \draw [step=0.25,color=blue!20,very thin] (-1.8,-1.6) grid (1.8,1.6); \foreach \ang in {0,30,...,330}{ \draw [color=red] (0,0) to[R, -*] ( \ang :1.1); οΏ½ Perfect text/graphics integration. \node at ( \ang :1.35) { \tiny $e^{j\ang^\circ}$}; } \end {tikzpicture} οΏ½ Programmability & flexibility οΏ½ Mathematical formulae pose no οΏ½ Good circuit library (circuitikz) οΏ½ Vector graphics , FOSDEM 20

  10. The end of the tunnel? Not yet... CircuiTi k Z seemed the right tool, but... Circuit Macros! Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 β–Ά Too much use of absolute coordinates to position elements β–Ά Aesthetical issues , FOSDEM 20

  11. What is PyCirkuit? In short: circuits Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 β–Ά A program to help drawing those β–Ά Written in Python 3 + PyQt5 β–Ά 2 modes of operation: β–Ά GUI β–Ά CLI / Batch mode , FOSDEM 20

  12. PyCirkuit - How it works Phase 1: The Β«Circuit MacrosΒ» source file m4 .pic file Circuit macros Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  13. 2nd February 2020 T Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC EX T A L Generic PDF PostScript SVG xfig EX Β«pictureΒ» A L eepicemu mfpic MetaPost PostScript+psfrag PSTricks PGF-TikZ dpic file .pic Phase 2: The Dpic PyCirkuit - How it works , FOSDEM 20

  14. 2nd February 2020 pdfL Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC .png pdfuoppm .pdf Template EX A T .tikz dpic .pic Macros Circuit m4 file source Phase 3: Visualisation The PyCirkuit , FOSDEM 20

  15. 2nd February 2020 pdfL Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC .jpg .png pdfuoppm .pdf Template EX A T .tikz .svg dpic .pic Macros Circuit m4 file source Phase 4: Exporting and Extra bonus The PyCirkuit , FOSDEM 20

  16. PyCirkuit Installation Outside Debian you must install some PyCirkuit dependencies by hand. See README file on GitHub project page. Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 β–Ά On Debian Testing (Bullseye) is straightforward: apt-get install pycirkuit β–Ά From PyPI (recommended for MacOs/Windows) pip install pycirkuit β–Ά From GitHub pip install git+https://github.com/orestesmas/pycirkuit.git , FOSDEM 20

  17. Demonstrations

  18. Demo Graphical User Interface Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  19. Demo Command-Line Interface Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 , FOSDEM 20

  20. Future work What’s planned? Primary goals Secondary goals Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 β–Ά Documentation and code cleaning β–Ά Supporting/improving other input and output formats β–Ά Improve the editor β–Ά Allow simultaneous drawings on GUI β–Ά Configurable workflows. Plugin-based architecture? β–Ά Become a KDE project? (KDE - Python bindings!) , FOSDEM 20

  21. Relevant links Main Other Orestes Mas (orestes@tsc.upc.edu) - UPC Quality diagrams with PyCirkuit 2nd February 2020 β–Ά GitHub repo: https://github.com/orestesmas/pycirkuit β–Ά PyPI repo: https://pypi.org/project/pycirkuit/ β–Ά PIC language: http://plan9.bell-labs.com/10thEdMan/pic.pdf β–Ά PIC tutorial: http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/pic.html β–Ά Dpic site: https://ece.uwaterloo.ca/~aplevich/dpic/ β–Ά Circuit Macros: https://ece.uwaterloo.ca/~aplevich/Circuit_macros/ , FOSDEM 20

  22. 2nd February 2020 projects! Acknowledgements EX and L A T EX Quality diagrams with PyCirkuit Orestes Mas (orestes@tsc.upc.edu) - UPC β–Ά Donald Knuth & Leslie Lamport: For giving us T β–Ά Till Tantau: Author of Ti k Z (and Beamer too) β–Ά Dwight Aplevich: Circuit Macros and Dpic author β–Ά Matteo Agostinelli: β€œcirkuit” application β–Ά Aniol Marti & Γ€lex Muntada: Debian packages for dpic , circuit-macros and pycirkuit β–Ά ...and the free sofuware community for the contributions to these , FOSDEM 20

  23. Thank you!

Recommend


More recommend