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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
6e64b466
Commit
6e64b466
authored
16 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
back to old stereo projection
parent
0f099411
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/gmshSurface.cpp
+4
-5
4 additions, 5 deletions
Geo/gmshSurface.cpp
Mesh/Field.cpp
+1
-0
1 addition, 0 deletions
Mesh/Field.cpp
Plugin/GSHHS.cpp
+2
-2
2 additions, 2 deletions
Plugin/GSHHS.cpp
with
7 additions
and
7 deletions
Geo/gmshSurface.cpp
+
4
−
5
View file @
6e64b466
...
@@ -83,14 +83,13 @@ gmshSurface *gmshPolarSphere::NewPolarSphere(int iSphere, double x, double y, do
...
@@ -83,14 +83,13 @@ gmshSurface *gmshPolarSphere::NewPolarSphere(int iSphere, double x, double y, do
gmshPolarSphere
::
gmshPolarSphere
(
double
x
,
double
y
,
double
z
,
double
_r
)
:
r
(
_r
),
o
(
x
,
y
,
z
)
{
gmshPolarSphere
::
gmshPolarSphere
(
double
x
,
double
y
,
double
z
,
double
_r
)
:
r
(
_r
),
o
(
x
,
y
,
z
)
{
}
}
SPoint3
gmshPolarSphere
::
point
(
double
parA
,
double
parB
)
const
SPoint3
gmshPolarSphere
::
point
(
double
u
,
double
v
)
const
{
{
//stereographic projection from the south pole, origin of the axis
//stereographic projection from the south pole, origin of the axis
//at the center of the sphere
//at the center of the sphere
//parA=2rx/(r+z) parB=2ry/(r+z)
//u=-x/(r+z) v=-y/(r+z)
double
rp2
=
parA
*
parA
+
parB
*
parB
;
double
rp2
=
u
*
u
+
v
*
v
;
double
z
=
r
*
(
4
*
r
*
r
-
rp2
)
/
(
4
*
r
*
r
+
rp2
);
SPoint3
p
(
-
2
*
r
*
u
/
(
1
+
rp2
),
-
2
*
r
*
v
/
(
1
+
rp2
),
r
*
(
1
-
rp2
)
/
(
1
+
rp2
));
SPoint3
p
(
parA
*
(
r
+
z
)
/
(
2
*
r
),
parB
*
(
r
+
z
)
/
(
2
*
r
),
z
);
p
+=
o
;
p
+=
o
;
return
p
;
return
p
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/Field.cpp
+
1
−
0
View file @
6e64b466
...
@@ -1346,6 +1346,7 @@ void Field::put_on_view(PView *view, int comp)
...
@@ -1346,6 +1346,7 @@ void Field::put_on_view(PView *view, int comp)
data
->
setName
(
oss
.
str
());
data
->
setName
(
oss
.
str
());
data
->
finalize
();
data
->
finalize
();
view
->
setChanged
(
true
);
view
->
setChanged
(
true
);
data
->
destroyAdaptiveData
();
}
}
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Plugin/GSHHS.cpp
+
2
−
2
View file @
6e64b466
...
@@ -51,7 +51,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
...
@@ -51,7 +51,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
}
}
};
};
class
reader_gshhs
:
public
reader
{
class
reader_gshhs
:
public
reader
{
/* $Id: GSHHS.cpp,v 1.2
3
2009-01-1
5
1
3:28:30
remacle Exp $
/* $Id: GSHHS.cpp,v 1.2
4
2009-01-1
9
1
1:57:29
remacle Exp $
*
*
* Include file defining structures used in gshhs.c
* Include file defining structures used in gshhs.c
*
*
...
@@ -767,7 +767,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
...
@@ -767,7 +767,7 @@ class GMSH_GSHHSPlugin:public GMSH_Post_Plugin
}
}
void
add_point
(
SPoint3
point
){
void
add_point
(
SPoint3
point
){
double
r
=
sqrt
(
point
.
x
()
*
point
.
x
()
+
point
.
y
()
*
point
.
y
()
+
point
.
z
()
*
point
.
z
());
double
r
=
sqrt
(
point
.
x
()
*
point
.
x
()
+
point
.
y
()
*
point
.
y
()
+
point
.
z
()
*
point
.
z
());
SPoint2
stereo
(
2
*
r
*
point
.
x
()
/
(
r
+
point
.
z
()),
2
*
r
*
point
.
y
()
/
(
r
+
point
.
z
()));
SPoint2
stereo
(
-
point
.
x
()
/
(
r
+
point
.
z
()),
-
point
.
y
()
/
(
r
+
point
.
z
()));
loop_buff
<<
"Point ( IP + "
<<
ip
++
<<
" ) = {"
<<
stereo
.
loop_buff
<<
"Point ( IP + "
<<
ip
++
<<
" ) = {"
<<
stereo
.
x
()
<<
", "
<<
stereo
.
y
()
<<
", "
<<
0
<<
" };
\n
"
;
x
()
<<
", "
<<
stereo
.
y
()
<<
", "
<<
0
<<
" };
\n
"
;
}
}
...
...
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