Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ronan
Voronoi_Generation
Commits
894c842e
Commit
894c842e
authored
Jan 29, 2016
by
ronan
Browse files
BreakPoint corrigé
parent
54fea7b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Fortune.py
View file @
894c842e
...
...
@@ -63,7 +63,7 @@ class Fortune:
ly_2
=
ly
*
ly
;
# First part
h
=
x1_2
+
y1_2
+
ly_2
h
=
x1_2
+
y1_2
-
ly_2
e
=
2
*
(
y1
-
ly
)
# Second Part
...
...
@@ -74,12 +74,12 @@ class Fortune:
d
=
(
a
-
2
*
((
x1
*
b
)
/
e
))
f
=
(((
h
*
b
)
/
e
)
+
c
)
delta
=
-
(
d
*
d
-
4
*
b
/
e
*
f
)
delta
=
(
d
*
d
-
4
*
b
*
f
/
e
)
x
=
0
y
=
0
print
(
delta
)
assert
(
delta
>=
0
)
if
delta
>
0.00001
:
assert
(
delta
>=
0
)
,
"Ca a crashé "
+
str
(
delta
)
if
delta
<
0.00001
:
x
=
-
d
/
(
2
*
b
/
e
)
y
=
(
x
*
x
-
2
*
x1
*
x
+
h
)
/
e
else
:
...
...
main.py
View file @
894c842e
...
...
@@ -144,16 +144,6 @@ if __name__ == "__main__":
#canvas.bind("<Key>", clavier)
ly
=
100
f
=
Fortune
(
vec
)
p
=
[
f
.
sites
[
4
],
f
.
sites
[
5
]]
for
i
in
p
:
i
.
point
.
draw
(
canvas
)
draw_Pol
(
canvas
,
i
.
point
,
ly
)
a
=
f
.
computeBreakPoint
(
p
[
0
],
p
[
1
],
ly
)
a
.
draw
(
canvas
)
print
(
a
)
canvas
.
create_line
(
0
,
ly
,
500
,
ly
)
canvas
.
pack
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment