Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
triangulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
joey.martig
triangulation
Commits
db5b7551
Commit
db5b7551
authored
3 years ago
by
JM
Browse files
Options
Downloads
Patches
Plain Diff
Affichage correct en negatif et positif
parent
3faf287c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
geometry/geometry.c
+0
-14
0 additions, 14 deletions
geometry/geometry.c
main.c
+1
-1
1 addition, 1 deletion
main.c
result/result.stl
+4
-39
4 additions, 39 deletions
result/result.stl
with
5 additions
and
54 deletions
geometry/geometry.c
+
0
−
14
View file @
db5b7551
...
...
@@ -131,16 +131,6 @@ bool is_point_part_of_triangle(triangle* tri, position point){
* @return triangle* Triangle englobant toues les points.
*/
triangle
*
generate_super_triangle
(
position
min
,
position
max
){
//double min_x = 2 * min.x - EPSILON;
//double max_x = 2 * max.x + EPSILON;
//
//double min_y = 2 * min.y - EPSILON;
//double max_y = 2 * max.y + EPSILON;
//
//position a = (position){.x = min_x, .y = min_y, .z = 0};
//position b = (position){.x = max_x, .y = min_y, .z = 0};
//position c = (position){.x = min_x, .y = max_y, .z = 0};
position
center
=
(
position
){.
x
=
0
,
.
y
=
0
,
.
z
=
0
};
double
dst_min
=
distance
(
center
,
min
);
double
dst_max
=
distance
(
center
,
max
);
...
...
@@ -152,10 +142,6 @@ triangle* generate_super_triangle(position min, position max){
position
b
=
(
position
){.
x
=
cos
(
225
*
M_PI
/
180
)
*
dst
,
.
y
=
sin
(
225
*
M_PI
/
180
)
*
dst
,
.
z
=
0
};
position
c
=
(
position
){.
x
=
cos
(
315
*
M_PI
/
180
)
*
dst
,
.
y
=
sin
(
315
*
M_PI
/
180
)
*
dst
,
.
z
=
0
};
printf
(
"%f %f
\n
"
,
a
.
x
,
a
.
y
);
printf
(
"%f %f
\n
"
,
b
.
x
,
b
.
y
);
printf
(
"%f %f
\n\n
"
,
c
.
x
,
c
.
y
);
triangle
*
s_t
=
create_triangle
(
a
,
b
,
c
);
return
s_t
;
...
...
This diff is collapsed.
Click to expand it.
main.c
+
1
−
1
View file @
db5b7551
This diff is collapsed.
Click to expand it.
result/result.stl
+
4
−
39
View file @
db5b7551
solid result
facet normal
-
0.0
1
0000
-
0.0
1
0000 0.0
100
00
facet normal 0.0
0
0000 0.0
0
0000 0.0
225
00
outer loop
vertex 0.000000 0.100000 0.100000
vertex 0.000000 0.000000 0.000000
vertex 0.100000 0.000000 0.100000
endloop
endfacet
facet normal -0.010000 -0.010000 0.010000
outer loop
vertex 0.000000 0.100000 0.100000
vertex 0.100000 0.000000 0.100000
vertex 0.100000 0.100000 0.200000
endloop
endfacet
facet normal 0.000000 0.000000 0.000000
outer loop
vertex 0.100000 0.100000 0.200000
vertex 0.100000 0.000000 0.100000
vertex 0.150000 0.050000 0.100000
endloop
endfacet
facet normal 0.000000 0.000000 0.005000
outer loop
vertex 0.150000 0.050000 0.100000
vertex 0.100000 0.000000 0.100000
vertex 0.200000 0.000000 0.100000
endloop
endfacet
facet normal 0.000000 0.000000 0.000000
outer loop
vertex 0.100000 0.100000 0.200000
vertex 0.150000 0.050000 0.100000
vertex 0.250000 0.050000 0.200000
endloop
endfacet
facet normal -0.005000 -0.005000 0.005000
outer loop
vertex 0.150000 0.050000 0.100000
vertex 0.200000 0.000000 0.100000
vertex 0.250000 0.050000 0.200000
vertex -0.050000 0.100000 0.100000
vertex -0.050000 -0.050000 0.100000
vertex 0.100000 -0.050000 0.100000
endloop
endfacet
endsolid result
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