Finding the intersection of a pencil of lines with a plane and making a 3D plot of the ensemble
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I've computed the intersection of a plane with some lines. It looks OK until I try to make a 3D graph from intersec_lines.
alpha = Pi/5;
r1 = 5;
r2 = 2;
h = 3;
n = 20;
plane = InfinitePlane[0, 0, 0, Cos[alpha], 0, Sin[alpha], 0, 1, 0];
lines =
Table[
InfiniteLine[
r1*Cos[2*Pi*x/n], r1*Sin[2*Pi*x/n], 0,
r2*Cos[2*Pi*x/n], r2*Sin[2*Pi*x/n], h],
x, n];
intersec_points = NSolve[x, y, z â plane && x, y, z â #]& /@ lines
Does anyone know how to do it? It seem it should be pretty basic, but I'm just starting to use Mathematica.
plotting graphics3d
New contributor
add a comment |Â
up vote
2
down vote
favorite
I've computed the intersection of a plane with some lines. It looks OK until I try to make a 3D graph from intersec_lines.
alpha = Pi/5;
r1 = 5;
r2 = 2;
h = 3;
n = 20;
plane = InfinitePlane[0, 0, 0, Cos[alpha], 0, Sin[alpha], 0, 1, 0];
lines =
Table[
InfiniteLine[
r1*Cos[2*Pi*x/n], r1*Sin[2*Pi*x/n], 0,
r2*Cos[2*Pi*x/n], r2*Sin[2*Pi*x/n], h],
x, n];
intersec_points = NSolve[x, y, z â plane && x, y, z â #]& /@ lines
Does anyone know how to do it? It seem it should be pretty basic, but I'm just starting to use Mathematica.
plotting graphics3d
New contributor
2
Do not use_
in variable names, since_
has a special meaning in Mathematica.
â J. M. is somewhat okay.â¦
1 hour ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I've computed the intersection of a plane with some lines. It looks OK until I try to make a 3D graph from intersec_lines.
alpha = Pi/5;
r1 = 5;
r2 = 2;
h = 3;
n = 20;
plane = InfinitePlane[0, 0, 0, Cos[alpha], 0, Sin[alpha], 0, 1, 0];
lines =
Table[
InfiniteLine[
r1*Cos[2*Pi*x/n], r1*Sin[2*Pi*x/n], 0,
r2*Cos[2*Pi*x/n], r2*Sin[2*Pi*x/n], h],
x, n];
intersec_points = NSolve[x, y, z â plane && x, y, z â #]& /@ lines
Does anyone know how to do it? It seem it should be pretty basic, but I'm just starting to use Mathematica.
plotting graphics3d
New contributor
I've computed the intersection of a plane with some lines. It looks OK until I try to make a 3D graph from intersec_lines.
alpha = Pi/5;
r1 = 5;
r2 = 2;
h = 3;
n = 20;
plane = InfinitePlane[0, 0, 0, Cos[alpha], 0, Sin[alpha], 0, 1, 0];
lines =
Table[
InfiniteLine[
r1*Cos[2*Pi*x/n], r1*Sin[2*Pi*x/n], 0,
r2*Cos[2*Pi*x/n], r2*Sin[2*Pi*x/n], h],
x, n];
intersec_points = NSolve[x, y, z â plane && x, y, z â #]& /@ lines
Does anyone know how to do it? It seem it should be pretty basic, but I'm just starting to use Mathematica.
plotting graphics3d
plotting graphics3d
New contributor
New contributor
edited 15 mins ago
m_goldberg
82.3k869190
82.3k869190
New contributor
asked 1 hour ago
Lorenzo F.
111
111
New contributor
New contributor
2
Do not use_
in variable names, since_
has a special meaning in Mathematica.
â J. M. is somewhat okay.â¦
1 hour ago
add a comment |Â
2
Do not use_
in variable names, since_
has a special meaning in Mathematica.
â J. M. is somewhat okay.â¦
1 hour ago
2
2
Do not use
_
in variable names, since _
has a special meaning in Mathematica.â J. M. is somewhat okay.â¦
1 hour ago
Do not use
_
in variable names, since _
has a special meaning in Mathematica.â J. M. is somewhat okay.â¦
1 hour ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
Using RegionIntersection
is the most straightforward route for finding the intersection points:
With[ñ = ÃÂ/5, r1 = 5, r2 = 2, h = 3, n = 20,
plane = InfinitePlane[0, 0, 0, Cos[ñ], 0, Sin[ñ], 0, 1, 0];
lines = Table[InfiniteLine[r1 Cos[2 ÃÂ x/n], r1 Sin[2 ÃÂ x/n], 0,
r2 Cos[2 ÃÂ x/n], r2 Sin[2 ÃÂ x/n], h], x, n];]
pts = RegionIntersection[plane, #] & /@ lines;
Graphics3D[plane, lines, Sphere[#, 1/4] & @@@ pts, Axes -> True, PlotRange -> 10]
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
Using RegionIntersection
is the most straightforward route for finding the intersection points:
With[ñ = ÃÂ/5, r1 = 5, r2 = 2, h = 3, n = 20,
plane = InfinitePlane[0, 0, 0, Cos[ñ], 0, Sin[ñ], 0, 1, 0];
lines = Table[InfiniteLine[r1 Cos[2 ÃÂ x/n], r1 Sin[2 ÃÂ x/n], 0,
r2 Cos[2 ÃÂ x/n], r2 Sin[2 ÃÂ x/n], h], x, n];]
pts = RegionIntersection[plane, #] & /@ lines;
Graphics3D[plane, lines, Sphere[#, 1/4] & @@@ pts, Axes -> True, PlotRange -> 10]
add a comment |Â
up vote
3
down vote
Using RegionIntersection
is the most straightforward route for finding the intersection points:
With[ñ = ÃÂ/5, r1 = 5, r2 = 2, h = 3, n = 20,
plane = InfinitePlane[0, 0, 0, Cos[ñ], 0, Sin[ñ], 0, 1, 0];
lines = Table[InfiniteLine[r1 Cos[2 ÃÂ x/n], r1 Sin[2 ÃÂ x/n], 0,
r2 Cos[2 ÃÂ x/n], r2 Sin[2 ÃÂ x/n], h], x, n];]
pts = RegionIntersection[plane, #] & /@ lines;
Graphics3D[plane, lines, Sphere[#, 1/4] & @@@ pts, Axes -> True, PlotRange -> 10]
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Using RegionIntersection
is the most straightforward route for finding the intersection points:
With[ñ = ÃÂ/5, r1 = 5, r2 = 2, h = 3, n = 20,
plane = InfinitePlane[0, 0, 0, Cos[ñ], 0, Sin[ñ], 0, 1, 0];
lines = Table[InfiniteLine[r1 Cos[2 ÃÂ x/n], r1 Sin[2 ÃÂ x/n], 0,
r2 Cos[2 ÃÂ x/n], r2 Sin[2 ÃÂ x/n], h], x, n];]
pts = RegionIntersection[plane, #] & /@ lines;
Graphics3D[plane, lines, Sphere[#, 1/4] & @@@ pts, Axes -> True, PlotRange -> 10]
Using RegionIntersection
is the most straightforward route for finding the intersection points:
With[ñ = ÃÂ/5, r1 = 5, r2 = 2, h = 3, n = 20,
plane = InfinitePlane[0, 0, 0, Cos[ñ], 0, Sin[ñ], 0, 1, 0];
lines = Table[InfiniteLine[r1 Cos[2 ÃÂ x/n], r1 Sin[2 ÃÂ x/n], 0,
r2 Cos[2 ÃÂ x/n], r2 Sin[2 ÃÂ x/n], h], x, n];]
pts = RegionIntersection[plane, #] & /@ lines;
Graphics3D[plane, lines, Sphere[#, 1/4] & @@@ pts, Axes -> True, PlotRange -> 10]
answered 1 hour ago
J. M. is somewhat okay.â¦
93.4k10289445
93.4k10289445
add a comment |Â
add a comment |Â
Lorenzo F. is a new contributor. Be nice, and check out our Code of Conduct.
Lorenzo F. is a new contributor. Be nice, and check out our Code of Conduct.
Lorenzo F. is a new contributor. Be nice, and check out our Code of Conduct.
Lorenzo F. is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182818%2ffinding-the-intersection-of-a-pencil-of-lines-with-a-plane-and-making-a-3d-plot%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Do not use
_
in variable names, since_
has a special meaning in Mathematica.â J. M. is somewhat okay.â¦
1 hour ago