Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
3777edb5
Commit
3777edb5
authored
10 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
JSON layout for the 24-pixel ring
parent
bbf87ea1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/layouts/create_ring24.js
+20
-0
20 additions, 0 deletions
examples/layouts/create_ring24.js
examples/layouts/ring24.json
+1
-0
1 addition, 0 deletions
examples/layouts/ring24.json
with
21 additions
and
0 deletions
examples/layouts/create_ring24.js
0 → 100644
+
20
−
0
View file @
3777edb5
/*
* Model creation script for a 24-pixel ring
*
* 2014 Micah Elizabeth Scott
* This file is released into the public domain.
*/
var
model
=
[]
var
count
=
24
;
var
radius
=
0.2
;
var
index
=
0
;
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
var
angle
=
i
*
2
*
Math
.
PI
/
count
;
model
[
index
++
]
=
{
point
:
[
-
radius
*
Math
.
sin
(
angle
),
0
,
-
radius
*
Math
.
cos
(
angle
)
]
};
}
console
.
log
(
JSON
.
stringify
(
model
));
This diff is collapsed.
Click to expand it.
examples/layouts/ring24.json
0 → 100644
+
1
−
0
View file @
3777edb5
[{
"point"
:[
0
,
0
,
-0.2
]},{
"point"
:[
-0.05176380902050415
,
0
,
-0.19318516525781368
]},{
"point"
:[
-0.09999999999999999
,
0
,
-0.17320508075688776
]},{
"point"
:[
-0.1414213562373095
,
0
,
-0.14142135623730953
]},{
"point"
:[
-0.17320508075688773
,
0
,
-0.10000000000000003
]},{
"point"
:[
-0.19318516525781368
,
0
,
-0.05176380902050415
]},{
"point"
:[
-0.2
,
0
,
-1.2246063538223773e-17
]},{
"point"
:[
-0.19318516525781368
,
0
,
0.05176380902050413
]},{
"point"
:[
-0.17320508075688776
,
0
,
0.09999999999999996
]},{
"point"
:[
-0.14142135623730953
,
0
,
0.1414213562373095
]},{
"point"
:[
-0.09999999999999999
,
0
,
0.17320508075688776
]},{
"point"
:[
-0.0517638090205042
,
0
,
0.19318516525781365
]},{
"point"
:[
-2.4492127076447546e-17
,
0
,
0.2
]},{
"point"
:[
0.05176380902050416
,
0
,
0.19318516525781368
]},{
"point"
:[
0.09999999999999995
,
0
,
0.17320508075688779
]},{
"point"
:[
0.14142135623730942
,
0
,
0.1414213562373096
]},{
"point"
:[
0.17320508075688767
,
0
,
0.10000000000000009
]},{
"point"
:[
0.19318516525781368
,
0
,
0.05176380902050413
]},{
"point"
:[
0.2
,
0
,
3.673819061467132e-17
]},{
"point"
:[
0.1931851652578137
,
0
,
-0.051763809020504065
]},{
"point"
:[
0.17320508075688773
,
0
,
-0.10000000000000003
]},{
"point"
:[
0.14142135623730953
,
0
,
-0.14142135623730948
]},{
"point"
:[
0.10000000000000009
,
0
,
-0.17320508075688767
]},{
"point"
:[
0.051763809020504314
,
0
,
-0.19318516525781362
]}]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment