Platform
Resources
Pricing
Sign in
Get started
Jacob Rus
geodetic computer
Workspace
Fork
Published
By
Jacob Rus
Edited
Jan 14, 2019
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
clothoid_plot
=
(
)
=>
bezpts_to_svgpath
(
bezeval
(
clothoid
,
[
-
maxs
,
maxs
]
,
viewport
,
tolerance
)
,
digits
)
Insert cell
offset_clothoid_plot
=
(
offset
)
=>
bezpts_to_svgpath
(
bezeval
(
offset_clothoid
(
offset
)
,
[
-
maxs
,
maxs
]
,
viewport
,
tolerance
)
,
digits
)
Insert cell
dFresnelC
=
vals2coeffs
(
pts
.
map
(
s
=>
Math
.
cos
(
s
*
s
)
)
)
Insert cell
dFresnelS
=
vals2coeffs
(
pts
.
map
(
s
=>
Math
.
sin
(
s
*
s
)
)
)
Insert cell
FresnelC
=
cumsum
(
dFresnelC
)
.
map
(
c
=>
.5
*
maxs
*
c
)
Insert cell
FresnelS
=
cumsum
(
dFresnelS
)
.
map
(
c
=>
.5
*
maxs
*
c
)
Insert cell
clothoid
=
(
s
)
=>
{
const
t
=
(
Math
.
abs
(
s
)
*
2
/
maxs
)
-
1
;
const
ss
=
Math
.
sign
(
s
)
;
return
[
ss
*
evaluate
(
FresnelC
,
t
)
,
ss
*
evaluate
(
FresnelS
,
t
)
]
}
Insert cell
offset_clothoid
=
(
offset
)
=>
(
s
)
=>
{
const
t
=
(
Math
.
abs
(
s
)
*
2
/
maxs
)
-
1
;
const
ss
=
Math
.
sign
(
s
)
;
return
[
ss
*
evaluate
(
FresnelC
,
t
)
-
offset
*
evaluate
(
dFresnelS
,
t
)
,
ss
*
evaluate
(
FresnelS
,
t
)
+
offset
*
evaluate
(
dFresnelC
,
t
)
]
}
Insert cell
pts
=
chebpts
(
npts
)
.
map
(
t
=>
.5
*
maxs
*
(
t
+
1
)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import
{
chebpts
,
vals2coeffs
,
evaluate
,
diff
,
cumsum
}
from
'@jrus/cheb'
Insert cell
import
{
bezeval
,
bezpts_to_svgpath
}
from
'@jrus/bezplot'
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
single_plot
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
offset
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
maxs
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
clothoid_plot
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
offset_clothoid_plot
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dFresnelC
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dFresnelS
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
FresnelC
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
FresnelS
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
clothoid
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
offset_clothoid
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pts
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
npts
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tolerance
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
digits
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
viewport
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML