Description Adds a finite conjugate lens module surface type to the document.
Syntax LMNode = ModulePerfLensFiniteAdd( ent, rad, mag )
Parameters LMNode (Long) Node number of the finite conjugate lens module surface added to the document.
ent As T_ENTITY Data structure containing generic information about the surface (name, description, traceable, etc.).
focal As Double Focal length of the lens module.
mag As Double Transverse magnification at which the finite conjugate lens module is being used.
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
|