Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
e6865e83
Commit
e6865e83
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
acos->myacos
parent
424c584d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Graphics/Entity.cpp
+3
-4
3 additions, 4 deletions
Graphics/Entity.cpp
Mesh/Utils.cpp
+2
-2
2 additions, 2 deletions
Mesh/Utils.cpp
Numeric/Numeric.cpp
+11
-1
11 additions, 1 deletion
Numeric/Numeric.cpp
Numeric/Numeric.h
+13
-13
13 additions, 13 deletions
Numeric/Numeric.h
with
29 additions
and
20 deletions
Graphics/Entity.cpp
+
3
−
4
View file @
e6865e83
// $Id: Entity.cpp,v 1.3
2
2004-0
3-01 23:43:53
geuzaine Exp $
// $Id: Entity.cpp,v 1.3
3
2004-0
4-13 18:47:32
geuzaine Exp $
//
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -88,8 +88,7 @@ void Draw_Cylinder(double width, double *x, double *y, double *z, int light)
...
@@ -88,8 +88,7 @@ void Draw_Cylinder(double width, double *x, double *y, double *z, int light)
prodve
(
zdir
,
vdir
,
axis
);
prodve
(
zdir
,
vdir
,
axis
);
norme
(
axis
);
norme
(
axis
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
phi
=
180.
*
acos
(
cosphi
)
/
M_PI
;
phi
=
180.
*
myacos
(
cosphi
)
/
M_PI
;
glTranslatef
(
x
[
0
],
y
[
0
],
z
[
0
]);
glTranslatef
(
x
[
0
],
y
[
0
],
z
[
0
]);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
gluCylinder
(
qua
,
radius
,
radius
,
length
,
CTX
.
quadric_subdivisions
,
1
);
gluCylinder
(
qua
,
radius
,
radius
,
length
,
CTX
.
quadric_subdivisions
,
1
);
...
@@ -352,7 +351,7 @@ void Draw_3DArrow(double relHeadRadius, double relStemLength, double relStemRadi
...
@@ -352,7 +351,7 @@ void Draw_3DArrow(double relHeadRadius, double relStemLength, double relStemRadi
prodve
(
zdir
,
vdir
,
axis
);
prodve
(
zdir
,
vdir
,
axis
);
norme
(
axis
);
norme
(
axis
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
prosca
(
zdir
,
vdir
,
&
cosphi
);
phi
=
180.
*
acos
(
cosphi
)
/
M_PI
;
phi
=
180.
*
my
acos
(
cosphi
)
/
M_PI
;
glTranslatef
(
x
,
y
,
z
);
glTranslatef
(
x
,
y
,
z
);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
glRotatef
(
phi
,
axis
[
0
],
axis
[
1
],
axis
[
2
]);
...
...
This diff is collapsed.
Click to expand it.
Mesh/Utils.cpp
+
2
−
2
View file @
e6865e83
// $Id: Utils.cpp,v 1.2
3
2004-0
3-28 01:16
:5
0
geuzaine Exp $
// $Id: Utils.cpp,v 1.2
4
2004-0
4-13 18:49
:5
8
geuzaine Exp $
//
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -615,7 +615,7 @@ double angle_3pts(Vertex * a, Vertex * b, Vertex * c)
...
@@ -615,7 +615,7 @@ double angle_3pts(Vertex * a, Vertex * b, Vertex * c)
prosca
=
((
a
->
Pos
.
X
-
b
->
Pos
.
X
)
*
(
c
->
Pos
.
X
-
b
->
Pos
.
X
)
+
prosca
=
((
a
->
Pos
.
X
-
b
->
Pos
.
X
)
*
(
c
->
Pos
.
X
-
b
->
Pos
.
X
)
+
(
a
->
Pos
.
Y
-
b
->
Pos
.
Y
)
*
(
c
->
Pos
.
Y
-
b
->
Pos
.
Y
))
/
L
;
(
a
->
Pos
.
Y
-
b
->
Pos
.
Y
)
*
(
c
->
Pos
.
Y
-
b
->
Pos
.
Y
))
/
L
;
angle
=
acos
(
prosca
)
*
180.
/
Pi
;
angle
=
my
acos
(
prosca
)
*
180.
/
Pi
;
return
(
angle
);
return
(
angle
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Numeric/Numeric.cpp
+
11
−
1
View file @
e6865e83
// $Id: Numeric.cpp,v 1.1
1
2004-0
2-07 01:40:2
2 geuzaine Exp $
// $Id: Numeric.cpp,v 1.1
2
2004-0
4-13 18:47:3
2 geuzaine Exp $
//
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -84,6 +84,16 @@ double myasin(double a)
...
@@ -84,6 +84,16 @@ double myasin(double a)
return
asin
(
a
);
return
asin
(
a
);
}
}
double
myacos
(
double
a
)
{
if
(
a
<=
-
1.
)
return
Pi
;
else
if
(
a
>=
1.
)
return
0.
;
else
return
acos
(
a
);
}
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
])
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
])
{
{
c
[
2
]
=
a
[
0
]
*
b
[
1
]
-
a
[
1
]
*
b
[
0
];
c
[
2
]
=
a
[
0
]
*
b
[
1
]
-
a
[
1
]
*
b
[
0
];
...
...
This diff is collapsed.
Click to expand it.
Numeric/Numeric.h
+
13
−
13
View file @
e6865e83
...
@@ -58,6 +58,7 @@ int check_gsl();
...
@@ -58,6 +58,7 @@ int check_gsl();
double
myatan2
(
double
a
,
double
b
);
double
myatan2
(
double
a
,
double
b
);
double
myasin
(
double
a
);
double
myasin
(
double
a
);
double
myacos
(
double
a
);
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
]);
void
prodve
(
double
a
[
3
],
double
b
[
3
],
double
c
[
3
]);
void
prosca
(
double
a
[
3
],
double
b
[
3
],
double
*
c
);
void
prosca
(
double
a
[
3
],
double
b
[
3
],
double
*
c
);
void
norme
(
double
a
[
3
]);
void
norme
(
double
a
[
3
]);
...
@@ -73,7 +74,6 @@ double InterpolateIso(double *X, double *Y, double *Z,
...
@@ -73,7 +74,6 @@ double InterpolateIso(double *X, double *Y, double *Z,
double
*
XI
,
double
*
YI
,
double
*
ZI
);
double
*
XI
,
double
*
YI
,
double
*
ZI
);
void
gradSimplex
(
double
*
x
,
double
*
y
,
double
*
z
,
double
*
v
,
double
*
grad
);
void
gradSimplex
(
double
*
x
,
double
*
y
,
double
*
z
,
double
*
v
,
double
*
grad
);
/* Numerical routines implemented using either Numerical Recipes or
/* Numerical routines implemented using either Numerical Recipes or
the GSL */
the GSL */
...
...
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