Navigation: Scripting Reference Manual > Functions & Subroutines > GetSourceDirAstigmaticFocii

 

GetSourceDirAstigmaticFocii

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves the ray direction specification from a source whose ray direction type is Focus to/from Astigmatic Focii

 

Syntax

success = GetSourceDirAstigmaticFocii( src, xfocus, yfocus, isToward )

 

Parameters

success (Boolean)

Returned boolean indicating whether the ray direction specification was successfully retrieved from the source node.

 

src As Long

Node number of the source whose ray direction specification is being queried.

 

xfocus As Double

Specifies the Z-position of the astigmatic focus in the X direction.  The position is specified in the source's coordinate system.

 

yfocus As Double

Specifies the Z-position of the astigmatic focus in the Y direction.  The position is specified in the source's coordinate system.

 

isToward As Boolean

Specifies whether the ray directions are oriented towards the astigmatic focii or away from the astigmatic focii.

 

Example

The example below retrieves the Focus to/from Astigmatic Focii parameters from a source node, scales the x and y focus points by a factor of 10 and applies the modified specification back to the source node.

 

Sub Main

          

    Dim src As Long

    src = FindFullName( "Optical Sources.Source 1" )

 

    Dim xfocus As Double, yfocus As Double, isToward As Boolean

    If IsSourceDirAstigmaticFocii( src ) Then

       

        'Retrieve current parameters

        GetSourceDirAstigmaticFocii( src, xfocus, yfocus, isToward )

        Print ""

        Print "Current astigmatic focii parameters:"

        Print "Sagittal focus: " & xfocus

        Print "Tangential focus: " & yfocus

        Print "Toward?: " & isToward

        Print ""

 

        'Modify the parameters

        SetSourceDirAstigmaticFocii( src, xfocus*10, yfocus*10, isToward )

        Update

        Print "Modified the source."

 

    End If

 

End Sub

 

See Also

Detailed Source Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC