Git Product home page Git Product logo

Comments (6)

cbersch avatar cbersch commented on September 25, 2024

Can you give a short example which shows the potential use of an \optpoint? At the moment I have no idea how that macro could work.

from pst-optexp.

schliwo avatar schliwo commented on September 25, 2024

\optpoint[angle=X, beamdivergence=Y](A)
this makes sense only as a starting point of a widebeam of course
i have just started jusing optexp so maybe i'm missing something and this does not make sense at all :)

from pst-optexp.

cbersch avatar cbersch commented on September 25, 2024

I would consider the angle and beamdivergence as properties of the beam and not associate to a point (or node). Although this could make sense as a kind of source:

\pnodes(0,1){A}(5,1){B}
\optsource[beamdiv=10, beamangle=0](A)
\lens(A)(B)
\drawwidebeam{1-2}

or one could have an \optbox declared as source:

\pnodes(0,1){A}(5,1){B}
\optbox[position=start, beamdiv=10, beamwidth=0.1, beamangle=0](A)
\lens(A)(B)
\drawwidebeam{1-2}

If this would be helpful for you, I can try to integrate this functionality.

from pst-optexp.

schliwo avatar schliwo commented on September 25, 2024

right now my solution is a optplane at the end and a optbox at the start, drawing the widebeam from end to start and by this i have a "focused" beam at the optbox, this works of course but your last solution
\optbox[position=start, beamdiv=10, beamwidth=0.1, beamangle=0](A)
would be even nicer

from pst-optexp.

cbersch avatar cbersch commented on September 25, 2024

The new version 4.9 has an \optsource component:

\documentclass{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(5,2)
  \pnodes(1.5,1){A}(5,1){B}
  \optsource[innerlabel, beamdiv=10, beamangle=10](A)(B){Laser}
  \lens[lens=2 2 2](A)(B)
  \optplane(B)
  \drawwidebeam{-}
  \drawbeam[linecolor=red]{-}
\end{pspicture}
\end{document}

from pst-optexp.

cbersch avatar cbersch commented on September 25, 2024

Note, that I changed the beam alignment behavior in version 4.10.

from pst-optexp.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.