Hi all,
Im very new to lisp. recently i got a tutorial to do in lisp.
see attached png file, how can i create the star with 5 ponts?
any help ?
|
|
|
Hi all,
Im very new to lisp. recently i got a tutorial to do in lisp.
see attached png file, how can i create the star with 5 ponts?
any help ?
Last edited by sandeepk; 2009-05-14 at 05:34 AM. Reason: forgot attachment
R. Robert Bell
Design Technology Manager
Stantec
Opinions expressed are mine alone and do not reflect the views of Stantec.
The following is a sample:
Hope it helps.Code:(defun C:Star ;start your code's function & name your own command as STAR (/ DTR InsertPoint Point1 ...) ;define points' name and other functions in your code as the local variables (defun DTR (A) (* pi (/ A 180.0))) ;sub-function that convents input angle value from degree to radian. (setq InsertPoint (getpoint "\nSelect Insert Point: ")) ;insert point definition (setq Point1 (polar InsertPoint (DTR degrees) Distance_From_InsertPoint_to_Point1) ;the above line defines Point1 referenced to InsetPoint. ;you need to fill in a angle in degree & a distance in this sample (setq Point2 similar_definition_to_Point1_above) ;and so on... (command "line" Point1 Point2 ...) ;draw a star with lines along your defined points. (princ) ;prevent lisp from returning any unwanted text to the command prompt. ) ;end of your code
Last edited by sandeepk; 2009-05-18 at 04:49 AM.