Zobrazit plnou verzi příspěvku: epicykloida

Honzicek
03.03.2006, 19:42
Dobrý den mám za úkol udělat pár progrogramů na kreslení technických křivek. Zjistil jsem si parametrickou rovnici a dal se do psaní ale nějak nevim jak na to(defun c:epicykloida()  (setq a(getreal"Zadejte poloměr pevné kružnice:"))  (setq b(getreal"Zadejte poloměr kutálející se kružnice:"))  (setq t1 0)         &nbs p;    (setq t2 (2* PI))  (setq int (/ (- t2 t1) 100.0)  (setq c t1)  (setq x (-(* (+ a b) (cos c))(* c( cos (* (/ (+ a b) b) c)))))  (setq y (-(* (+ a b) (sin c))(* c( sin (* (/ (+ a b) b) c)))))  (setq x (+ x 40)  (setq y (+ y 50)  (repeat 100         &nb sp;    =:>potřeboval bych vědět kolikrát se to má opakovat to číslo tam je jen tak...    (setq c (+ int c))    (setq x (-(* (+ a b) (cos c))(* c( cos (* (/ (+ a b) b) c)))))    (setq y (-(* (+ a b) (sin c))(* c( sin (* (/ (+ a b) b) c)))))    (setq x (+ x 40)
   (setq y (+ y 50)   (command "úsečka" "@" (list x y) "")    )   (command "regen")    )ještě by to chtělo tu pevnou kružnici ale nevim jak jí mám nakreslit  píše mito chyba při vstupu....





jsem na programování lama...poraďte pls...

Seiner
03.03.2006, 22:17
To číslo 100 je tam přece proto, že na řádku (setq int (/ (- t2 t1) 100.0)dělíte interval 100.
Z Vašeho dotazu a z toho, co tam píšete je opravdu vidět, že jen matně tušíte, co vlastně děláte. Můžete mi třeba vysvětlit, proč počítáte interval odvalování tak, že od obvodu pevné kružnice odečtete NULU?? Co očekáváte za výsledek .(On by i výchozí bod šel určit i jednodušeji, než výpočtem z rovnic, kdyby se vědělo, co se vlastně kreslí, že...)
Z důvodu, který netuším, posouváte spočítané body o 40,50, takže ta pevná kružnice bude:
(command "_CIRCLE" 40,50 a)
(Na notebooku doma nemám plný AutoCAD - nemůžu ověřit funkčnost)

Seiner
03.03.2006, 23:05
Další poznámky:
- chybí tam spousta párových závorek - to je důvod, proč to hází poškozený seznam,
- plný úhel se spočítá (* 2. PI)
Formálně jsem Vám to opravil na:
(defun c:epicykloida()  (setq a(getreal"Zadejte poloměr pevné kružnice:"))  (setq b(getreal"Zadejte poloměr kutálející se kružnice:"))  (setq t1 0)          (setq t2 (* 2. PI))  (setq int (/ (- t2 t1) 100.0))  (setq c t1)  (setq x (-(* (+ a b) (cos c))(* c( cos (* (/ (+ a b) b) c)))))  (setq y (-(* (+ a b) (sin c))(* c( sin (* (/ (+ a b) b) c)))))  (setq x (+ x 40))  (setq y (+ y 50))  (repeat 100       (setq c (+ int c))    (setq x (-(* (+ a b) (cos c))(* c( cos (* (/ (+ a b) b) c)))))    (setq y (-(* (+ a b) (sin c))(* c( sin (* (/ (+ a b) b) c)))))    (setq x (+ x 40))   (setq y (+ y 50))   (command "úsečka" "@" (list x y) "")    )   (command "_CIRCLE" (list 40 50) a)   (command "regen")    )
Ale zřejmě máte nějak blbě přepsané ty parametrické rovnice. Kreslí to epicykloidě nepodobnou bramboru.
 

Seiner
03.03.2006, 23:16
Takže funkční varianta je:
(defun c:epicykloida()  (setq a(getreal"Zadejte poloměr pevné kružnice:"))  (setq b(getreal"Zadejte poloměr kutálející se kružnice:"))  (setq t1 0)          (setq t2 (* 2. PI))  (setq int (/ (- t2 t1) 100.0))  (setq c t1)  (setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))  (setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))  (setq x (+ x 40))  (setq y (+ y 50))  (command "_POINT" (list x y))  (repeat 100       (setq c (+ int c))    (setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))    (setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))    (setq x (+ x 40))   (setq y (+ y 50))   (command "úsečka" "@" (list x y) "")    )   (command "_CIRCLE" (list 40 50) a)   (command "regen")    )
Ještě upuzornění: až to budete zkoušet, vypněte si uchopovací mód. Nebo nebudete věřit vlastním očím jako já

Honzicek
06.03.2006, 13:55
Uznávám...že s tím intervalem to nedává moc smysl odečítat od 2*PI nulu ale interval je přece od (0,2Pi) ?Myslim...

Honzicek
06.03.2006, 13:56
PS:Moc děkuji ale kreslí mi to nějakou záhadnou křivku i po vypnutí modu uchop



Honzicek
06.03.2006, 14:00
problém je v tom že u tý křivky se interval od (0,nekonečno...)jak se to dá zapsat v programu?

Seiner
06.03.2006, 14:09
a) mně to kreslí správně. Jaké zadáváte poloměry kružnic?
b) jaký interval o,nekonečno? Nerozumím. Parametrem je úlel odvalení a ten je od 0 do 2*PI rozdělený na 100 dílků.
c) kde jste přišel na jaké 0,2 PI ???

Seiner
06.03.2006, 14:16
Výstup u mne

Honzicek
07.03.2006, 13:08
nemyslel jsem 0,2PI ale interval od 0 do 2PI.. blbě jsem to napsal
jaké jste použil  poloměry kružnic pro tuto křivku?


Honzicek
07.03.2006, 13:21
mám třeba problém s tímhle zadán a=2 b=10   

a má to dělat:



Honzicek
07.03.2006, 13:22
jak se vkládá obrázek..?



Seiner
07.03.2006, 13:58

Takhle vypadá ta 2/10. Žádný problém. PRACUJETE OPRAVDU S TOU POSLDNÍ VERZÍ, KDE JSEM VÁM OPRAVIL VZORCE?
Vkládání obrázku: V AutoCADu zmenšit okno kolem požadovaného obrázku, vybrat do schránky (Ctrl-C), vložit do nějakého grafického malovátka (Irfan), použít tlačítka Nahrát obrázek na této stránce.

Ľubomír Pápay
07.03.2006, 14:29
Nesledujem túto tému, ale vidím že sa tu moríte s epicykloidou. Ja v
acade na geometricke krivky používam voľný lisp GEOMCURV.LSP
Stiahol som ho v minulosti niekde na webe. Poznáte ho? Možno by vám vyhovoval.
Ak je záujem, môžem ho poslať.
Lubo


Seiner
07.03.2006, 14:32
OK, jenže účelem této diskuse je naučit zmateného studenta programovat v lispu aspoň tak, aby byl schopen udělat domácí úkol :-)

Honzicek
07.03.2006, 15:00
 
¨
funguje to..paráda..jeětě  bych se chtěl zeptat jaké jste použil poloměry při té první ukázce??

Seiner
07.03.2006, 16:45
To už nevím, ale myslím, že pevná byla 100 a tvořící jednou 50 a jednou 25.

Honzicek
08.03.2006, 12:52
Ok děkuju moc všechno parádně funguje...ještě bych potřeboval udělat u tý epicykloidy toto:
zadám parametry a udělá mi to křivku -to mám
potom potřebuju,aby se mě to zeptalo,jestli jsem s křivkou spokojen a když dám ne,tak aby mi to tu křivku smazalo a hodilo mě to zpátky na tvorbu křivky
 
chtěl bych se zeptat,jestli by to šlo řešit funkcí ssget 
po přečtení co ta funkce vlastně dělá,ale pořád nevím,jestli tato funkce dokáže vybrat křivku v celku(nechci ale,abych to vybíral oknem)....kdyby toto nešlo,tak bych musel funkci naprogramovat tak aby vybrala posledních x(101 v tomto případě)entit...ale tady si nejsem jistý jak by to mělo vypadat..
??

Honzicek
09.03.2006, 16:47
možná bych to měl trochu zkrátit...prostě potřebuju,aby po tom co
udělám křivku program  dal uživateli na výběr \Konec\změnit
parametry\další\


Honzicek
09.03.2006, 17:00
(defun c:tk ()
  (initget "CY EP HYP EV ARCH  ")
  (setq word (getkword "Zadejte druh krivky:(CYkloida EPicykloida HYPocykloida EVolventa

ARCHimedova-spirála)"))
  (cond ((= word "CY")   (setq r(getreal"poloměr tvořící kružnice:"))
         &nbs p;         &nbs p;    
(setq d(getreal"vzdálenost bodu:"))
         &nbs p;         &nbs p;    
(setq pocet (getreal"Zadejte pocet cyklu:"))
         &nbs p;         &nbs p;    
(setq t1 0)
         &nbs p;         &nbs p;    
(setq t2 (* (pocet) 2. Pi))
         &nbs p;         &nbs p;    
(setq int (/ (- t2 t1) 100.0))
         &nbs p;         &nbs p;    
(setq bod(getpoint"Zadejte počáteční bod odvalovací úsečky:"))
         &nbs p;         &nbs p;    
(setq a t1)
         &nbs p;         &nbs p;    
(setq x (-(* r a)(* d (sin a))))
         &nbs p;         &nbs p;    
(setq y (- r (* d (cos
a))))        & nbsp;      
 
         &nbs p;         &nbs p;    
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;    
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;    
(command "bod" (list x y))
         &nbs p;         &nbs p;        
(repeat 100
         &nbs p;         &nbs p;         &nbs p;  
(setq a (+ int a))
         &nbs p;         &nbs p;         &nbs p;  
(setq x (-(* r a)(* d (sin a))))
         &nbs p;         &nbs p;         &nbs p;  
(setq y (- r(* d(cos a))))
         &nbs p;         &nbs p;         &nbs p;  
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;         &nbs p;  
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;         &nbs p;  
(command "úsečka" "@" (list x y) "")
         &nbs p;         &nbs p;         &nbs p;         &nbs p; 
)
         &nbs p;         &nbs p;    
(command "regen")
  
       &n bsp;         
(setq part 1))

         ((= word "EP")  (setq a(getreal"Zadejte poloměr pevné kružnice:"))
         &nbs p;         &nbs p;    
(setq b(getreal"Zadejte poloměr kutálející se kružnice:"))
         &nbs p;         &nbs p;    
(setq pocet (getreal"Zadejte pocet cyklu:"))
         &nbs p;         &nbs p;    
(setq bod (getpoint"Zadejte bod"))
         &nbs p;         &nbs p;    
(setq t1 0)       
         &nbs p;         &nbs p;    
(setq t2 (* (pocet) 2. Pi))
         &nbs p;         &nbs p;    
(setq int (/ (- t2 t1) 100.0))
         &nbs p;         &nbs p;    
(setq c t1)
         &nbs p;         &nbs p;    
(setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))
         &nbs p;         &nbs p;    
(setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))
         &nbs p;         &nbs p;    
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;    
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;    
(command "_POINT" (list x y))
         &nbs p;         &nbs p;      
(repeat 100  
         &nbs p;         &nbs p;        
(setq c (+ int c))
         &nbs p;         &nbs p;        
(setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))
         &nbs p;         &nbs p;        
(setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))
         &nbs p;         &nbs p;        
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;         
(s etq y (+ y (cadr bod)))
         &nbs p;         &nbs p;        
(command "úsečka" "@" (list x y) "")
         &nbs p;         &nbs p;         &nbs p;       
)
         &nbs p;         &nbs p;     
(command "_CIRCLE" (list (car bod) (cadr bod)) a)
         &nbs p;         &nbs p;     
(command "regen")
  
       &n bsp;         &n bsp;
(setq part 2))

    ((= word "HYP")  (setq a(getreal"Zadejte poloměr pevné kružnice:"))
         &nbs p;         &nbs p;    
(setq b(getreal"Zadejte poloměr kutálející se kružnice:"))
         &nbs p;         &nbs p;    
(setq pocet (getreal"Zadejte pocet cyklu:"))
         &nbs p;         &nbs p;    
(setq bod (getpoint"Zadejte bod:"))
         &nbs p;         &nbs p;    
(setq t1 0)       
         &nbs p;         &nbs p;    
(setq t2 (* (pocet) 2. PI))
         &nbs p;         &nbs p;    
(setq int (/ (- t2 t1) 100.0))
         &nbs p;         &nbs p;    
(setq c t1)
         &nbs p;         &nbs p;    
(setq x (+(* (- a b) (cos c))(* b( cos (* (/ (- a b) b) c)))))
         &nbs p;         &nbs p;    
(setq y (-(* (- a b) (sin c))(* b( sin (* (/ (- a b) b) c)))))
         &nbs p;         &nbs p;    
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;    
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;    
(command "_POINT" (list x y))
         &nbs p;         &nbs p;      
(repeat 100  
         &nbs p;         &nbs p;        
(setq c (+ int c))
         &nbs p;         &nbs p;        
(setq x (+(* (- a b) (cos c))(* b( cos (* (/ (- a b) b) c)))))
         &nbs p;         &nbs p;        
(setq y (-(* (- a b) (sin c))(* b( sin (* (/ (- a b) b) c)))))
         &nbs p;         &nbs p;        
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;        
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;     
(command "úsečka" "@" (list x y) "")
         &nbs p;         &nbs p;         &nbs p;     
)
         &nbs p;         &nbs p;     
(command "_CIRCLE" (list (car bod) (cadr bod)) a)
         &nbs p;         &nbs p;     
(command "regen")
  
       &n bsp;         &n bsp;
(setq part 3))

       ((= word "EV")     (setq r (getreal"Zadejte poloměr:"))
         &nbs p;         &nbs p;     
(setq d (getreal"Zadejte průměr:"))
         &nbs p;         &nbs p;     
(setq pocet (getreal"Zadejte pocet cyklu:"))
         &nbs p;         &nbs p;     
(setq bod (getpoint"Zadejte bod:"))
         &nbs p;         &nbs p;     
(setq t1 0)
         &nbs p;         &nbs p;     
(setq t2 (* (pocet) 2. PI))
         &nbs p;         &nbs p;     
(setq int (/(- t2 t1) 100.0))
         &nbs p;         &nbs p;     
(setq c t1)
         &nbs p;         &nbs p;     
(setq x  (+(*(+ r d) (cos c)) (* (* r c) (sin c))))
         &nbs p;         &nbs p;     
(setq y  (-(*(+ r d) (sin c)) (* (* r c) (cos c))))
         &nbs p;         &nbs p;     
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;     
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;     
(command "_POINT" (list x y))
         &nbs p;         &nbs p;       
(repeat 100
         &nbs p;         &nbs p;         
(s etq c (+ int c))
         &nbs p;         &nbs p;         
(s etq x  (+(*(+ r d) (cos c)) (* (* r c) (sin c))))
         &nbs p;         &nbs p;         
(s etq y  (-(*(+ r d) (sin c)) (* (* r c) (cos c))))
         &nbs p;         &nbs p;         
(s etq x (+ x (car bod)))
         &nbs p;         &nbs p;         
(s etq y (+ y (cadr bod)))
         &nbs p;         &nbs p;         
(c ommand "úsečka" "@" (list x y) "")
         &nbs p;         &nbs p;         &nbs p;         
)
         &nbs p;         &nbs p;     
(command "regen")
  
       &n bsp;         &n bsp;
(setq part 4))
    
    ((= word "ARCH")   (setq r(getreal"Zadejte poloměr Archimedovy spirály:"))
         &nbs p;         &nbs p;      
(setq pocet (getreal"Zadejte pocet cyklu:"))
         &nbs p;         &nbs p;      
(setq bod (getpoint"Zadejte bod:"))
         &nbs p;         &nbs p;      
(setq t1 0)
         &nbs p;         &nbs p;      
(setq t2 (* (pocet) 2. PI))
         &nbs p;         &nbs p;      
(setq int (/(- t2 t1) 100.0))
         &nbs p;         &nbs p;      
(setq c t1)
         &nbs p;         &nbs p;      
(setq x (* (* r c) (sin c)))
         &nbs p;         &nbs p;      
(setq y (* (* r c) (cos c)))
         &nbs p;         &nbs p;      
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;      
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;      
(command "_POINT" (list x y) )
         &nbs p;         &nbs p;        
(repeat 100
         &nbs p;         &nbs p;         &nbs p;
(setq c (+ int c))
         &nbs p;         &nbs p;         &nbs p;
(setq x (* (* r c) (sin c)))
         &nbs p;         &nbs p;         &nbs p;
(setq y (* (* r c) (cos c)))
         &nbs p;         &nbs p;         &nbs p;
(setq x (+ x (car bod)))
         &nbs p;         &nbs p;         &nbs p;
(setq y (+ y (cadr bod)))
         &nbs p;         &nbs p;         &nbs p;
(command "úsečka" "@" (list x y) "")
         &nbs p;         &nbs p;         &nbs p;         &nbs p;
)
         &nbs p;         &nbs p;      
(command "regen")
   
      &n bsp;         &n bsp; 
(setq part 5))


   
    (T (prompt "Chyba:nevybral jste žádnou křivku!!!"))
    )
)

 



zatim mám tohle...tedak nevim jestli je to správně protože jsem to  upravoval  v textáku ...

Honzicek
10.03.2006, 09:59
oprava:
(defun c:tk ()  (initget "CY EP HYP EV ARCH  ")  (setq word (getkword "Zadejte druh krivky:(CYkloida EPicykloida HYPocykloida EVolventa ARCHimedova-spirála)"))  (cond ((= word "CY")   (setq r(getreal"poloměr tvořící kružnice:"))                            (setq d(getreal"vzdálenost bodu:"))                            (setq pocet (getreal"Zadejte pocet cyklu:"))                    (setq bod(getpoint"Zadejte počáteční bod odvalovací úsečky:"))                    (command "úsečka" (list (car bod) (cadr bod)) (list (* (car bod) 1.2) (cadr bod)) "")         &nb sp;                             (setq t1 0)                            (setq t2 (* pocet Pi))                            (setq int (/ (- t2 t1) 100.0))                            (setq a t1)                            (setq x (-(* r a)(* d (sin a))))                            (setq y (- r (* d (cos a))))         & nbsp;                                  (setq x (+ x (car bod)))                            (setq y (+ y (cadr bod)))                            (command "bod" (list x y))                                (repeat 100                                    (setq a (+ int a))                                    (setq x (-(* r a)(* d (sin a))))                                    (setq y (- r(* d(cos a))))                                    (setq x (+ x (car bod)))                                    (setq y (+ y (cadr bod)))                                    (command "úsečka" "@" (list x y) "")                                               )                            (command "regen")                    (setq part 1))
         ((= word "EP")  (setq a(getreal"Zadejte poloměr pevné kružnice:"))                            (setq b(getreal"Zadejte poloměr kutálející se kružnice:"))                            (setq pocet (getreal"Zadejte pocet cyklu:"))                            (setq bod (getpoint"Zadejte bod"))                            (setq t1 0)                                  (setq t2 (* pocet Pi))                            (setq int (/ (- t2 t1) 100.0))                            (setq c t1)                            (setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))                            (setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))                            (setq x (+ x (car bod)))                            (setq y (+ y (cadr bod)))                            (command "_POINT" (list x y))                              (repeat 100                                 (setq c (+ int c))                                (setq x (-(* (+ a b) (cos c))(* b( cos (* (/ (+ a b) b) c)))))                                (setq y (-(* (+ a b) (sin c))(* b( sin (* (/ (+ a b) b) c)))))                                (setq x (+ x (car bod)))                                 (setq y (+ y (cadr bod)))                                (command "úsečka" "@" (list x y) "")                                          )                             (command "_CIRCLE" (list (car bod) (cadr bod)) a)                             (command "regen")                      (setq part 2))
 ((= word "HYP")  (setq a(getreal"Zadejte poloměr pevné kružnice:"))                            (setq b(getreal"Zadejte poloměr kutálející se kružnice:"))                            (setq pocet (getreal"Zadejte pocet cyklu:"))                            (setq bod (getpoint"Zadejte bod:"))                            (setq t1 0)                                  (setq t2 (* pocet PI))                            (setq int (/ (- t2 t1) 100.0))                            (setq c t1)                            (setq x (+(* (- a b) (cos c))(* b( cos (* (/ (- a b) b) c)))))                            (setq y (-(* (- a b) (sin c))(* b( sin (* (/ (- a b) b) c)))))                            (setq x (+ x (car bod)))                            (setq y (+ y (cadr bod)))                            (command "_POINT" (list x y))                              (repeat 100                                 (setq c (+ int c))                                (setq x (+(* (- a b) (cos c))(* b( cos (* (/ (- a b) b) c)))))                                (setq y (-(* (- a b) (sin c))(* b( sin (* (/ (- a b) b) c)))))                                (setq x (+ x (car bod)))                                (setq y (+ y (cadr bod)))                             (command "úsečka" "@" (list x y) "")                                       )                             (command "_CIRCLE" (list (car bod) (cadr bod)) a)                             (command "regen")                      (setq part 3))
       ((= word "EV")     (setq r (getreal"Zadejte poloměr:"))                             (setq d (getreal"Zadejte průměr:"))                             (setq pocet (getreal"Zadejte pocet cyklu:"))                             (setq bod (getpoint"Zadejte bod:"))                             (setq t1 0)                             (setq t2 (* pocet PI))                             (setq int (/(- t2 t1) 100.0))                             (setq c t1)                             (setq x  (+(*(+ r d) (cos c)) (* (* r c) (sin c))))                             (setq y  (-(*(+ r d) (sin c)) (* (* r c) (cos c))))                             (setq x (+ x (car bod)))                             (setq y (+ y (cadr bod)))                             (command "_POINT" (list x y))                               (repeat 100                                 (setq c (+ int c))                                 (setq x  (+(*(+ r d) (cos c)) (* (* r c) (sin c))))                                 (setq y  (-(*(+ r d) (sin c)) (* (* r c) (cos c))))                                 (setq x (+ x (car bod)))                                 (setq y (+ y (cadr bod)))                                 (command "úsečka" "@" (list x y) "")                                             )                             (command "regen")                      (setq part 4))  ((= word "ARCH")   (setq r(getreal"Zadejte poloměr Archimedovy spirály:"))                              (setq pocet (getreal"Zadejte pocet cyklu:"))                              (setq bod (getpoint"Zadejte bod:"))                              (setq t1 0)                              (setq t2 (* pocet PI))                              (setq int (/(- t2 t1) 100.0))                              (setq c t1)                              (setq x (* (* r c) (sin c)))                              (setq y (* (* r c) (cos c)))                              (setq x (+ x (car bod)))                              (setq y (+ y (cadr bod)))                              (command "_POINT" (list x y) )                                (repeat 100                                  (setq c (+ int c))                                  (setq x (* (* r c) (sin c)))                                  (setq y (* (* r c) (cos c)))                                  (setq x (+ x (car bod)))                                  (setq y (+ y (cadr bod)))                                  (command "úsečka" "@" (list x y) "")                                              )                              (command "regen")                       (setq part 5))
  (T (prompt "Chyba:nevybral jste žádnou křivku!!!")) ))