Description Retrieves information from a finite conjugate lens module surface.
Syntax ModulePerfLensFiniteGet LMNode, ent, focal, mag
Parameters LMNode As Long Node number of the finite conjugate lens module surface being queried.
ent As T_ENTITY Returned data structure containing generic information about the surface (name, description, traceable, etc.).
focal As Double Returned focal length of the lens module.
mag As Double Returned magnification at which the lens module is operating.
Example The following example demonstrates how to create, modify and retrieve information from a finite conjugate lens module surface.
Sub Main
Dim ent As T_ENTITY Dim CENode As Long, LMFinite As Long Dim focal As Double, mag As Double
'Add a custom element to store the LM surface ent.name = "Finite Conjugate LM" ent.Description = "Lens module representing an Finite conjugate lens" ent.parent = 2 'geometry ent.axesDrawable = False ent.limitsDrawable = False ent.traceable = True ent.neverTraceable = False CENode = AddCustomElement( ent )
'Add a finite conjugate lens module surface type ent.name = "Surf 1" ent.Description = "" ent.parent = CENode LMFinite = ModulePerfLensFiniteAdd( ent, 5, -1 ) Print "Finite Conjugate LM added:" Print Chr(9) & "Node number: " & LMFinite
'Update the document Update
'Modify finite conjugate lens module radius and retrieve information ModulePerfLensFiniteSet LMFinite, ent, 20, -2 ModulePerfLensFiniteGet LMFinite, ent, focal, mag Print Chr(9) & "New focal length: " & focal Print Chr(9) & "New magnification: " & mag
End Sub
See Also
|