Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
vEXP
Commits
2f2ea51e
Commit
2f2ea51e
authored
Oct 26, 2021
by
legoc
Browse files
Corrected bug with ki, kf trajectories
parent
927c2de2
Changes
2
Hide whitespace changes
Inline
Side-by-side
js/client/utils/shapes/trajectory-circle-iterator.js
View file @
2f2ea51e
const
{
matrix
}
=
require
(
'
../../server-state
'
);
/**
* Class defining the trajectory circle iterator.
*/
class
TrajectoryCircleIterator
{
constructor
(
center
,
start
,
end
,
intervals
)
{
this
.
_currentPosition
=
start
.
clone
();
this
.
_center
=
center
.
clone
();
let
CS
=
start
.
clone
().
sub
(
center
);
let
CE
=
end
.
clone
().
sub
(
center
);
// The vectors center, start and end are in Rc.
// They must be converted into R to calculate the circle.
this
.
_currentPosition
=
start
.
clone
().
applyMatrix3
(
matrix
.
bMatrix
);
this
.
_center
=
center
.
clone
().
applyMatrix3
(
matrix
.
bMatrix
);
this
.
_end
=
end
.
clone
().
applyMatrix3
(
matrix
.
bMatrix
);
let
CS
=
this
.
_currentPosition
.
clone
().
sub
(
this
.
_center
);
let
CE
=
this
.
_end
.
clone
().
sub
(
this
.
_center
);
this
.
_axis
=
CS
.
clone
().
cross
(
CE
).
normalize
();
this
.
_step
=
CS
.
angleTo
(
CE
)
/
intervals
;
...
...
@@ -15,7 +21,8 @@ class TrajectoryCircleIterator {
}
value
()
{
return
this
.
_currentPosition
.
clone
();
// The result vector is converted back in Rc.
return
this
.
_currentPosition
.
clone
().
applyMatrix3
(
matrix
.
bMatrix_1
);
}
next
()
{
...
...
js/client/views/panels/scattering-view.js
View file @
2f2ea51e
...
...
@@ -218,7 +218,7 @@ class ScatteringPanelView {
}
/**
* Updates the points with the new ki value.
* Updates the points with the new ki
or kf
value.
*/
updateQKiKf
(
ki
,
kf
,
qh
,
qk
,
ql
,
qnorm
,
ss
)
{
...
...
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