This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:signalgenerator [2025/09/02 16:57] – kalli | 4rpl:commands:signalgenerator [2025/09/03 16:43] (current) – [Sine wave in any direction without gaps] kalli | ||
---|---|---|---|
Line 144: | Line 144: | ||
==== Sine wave in any direction without gaps ==== | ==== Sine wave in any direction without gaps ==== | ||
{{ : | {{ : | ||
- | < | + | |
+ | < | ||
30 30 v2 165 91 v2 15 4.5 0 @getSinusoidCells ->list | 30 30 v2 165 91 v2 15 4.5 0 @getSinusoidCells ->list | ||
<-list 0 do | <-list 0 do | ||
Line 155: | Line 156: | ||
<-cell1 <-cell0 sub ->dir | <-cell1 <-cell0 sub ->dir | ||
<-dir.0 abs <-dir.1 abs max ->length | <-dir.0 abs <-dir.1 abs max ->length | ||
- | <-dir <-length asfloat div ->dirL | + | <-length eq0 if 0 0 v2 else <-dir <-length asfloat div endif ->dirL |
<-cell0 | <-cell0 | ||
- | < | + | < |
dup <-dirL add | dup <-dirL add | ||
loop | loop | ||
- | < | + | < |
: | : | ||
Line 167: | Line 168: | ||
->ampl | ->ampl | ||
->cell1 | ->cell1 | ||
- | dup -> | + | ->cell0 |
clearstack | clearstack | ||
Line 176: | Line 177: | ||
<-dir.1 <-dir.0 neg v2 <-ampl mul ->dirP | <-dir.1 <-dir.0 neg v2 <-ampl mul ->dirP | ||
- | < | + | < |
- | < | + | < |
- | -> | + | i <-freq <-shift 0 1 signalgenerator <-dirP mul <-axisCells[i] add @getSingleLineCells ListToStack |
- | else | + | |
- | pop -> | + | |
- | endif | + | |
loop | loop | ||
- | list dup 0 removelistelement | + | list |
</ | </ | ||
< | < |