2

Consider a simple plane equation

2x-3y+4z==7

I just want some position vector on that plane. For example, {7/2,0,0} would be great.

How can I ask Mathematica for 'some point' on this plane? The best I've got right now is:

Solve[plane && y == 0 && z == 0, x]

But I don't actually care what the values of y and z are, I just want some random point that satisfies the plane equation. Also that just returns the value of x - I want all three values in a vector (list?) form {a, b, c}.

Henry
  • 123
  • 3
  • There are quite literally an infinite number of points on that plane. You have to give some criteria for which point you want. – Sparr Feb 01 '14 at 04:45
  • 1
    And if I asked you to pick a random integer, could you do that? Could a computer? I think my question is pretty reasonable, and if the answer insists I put some bounds on the values, that's fine too. – Henry Feb 01 '14 at 04:51

2 Answers2

4

You can use FindInstance:

{x,y,z} /. FindInstance[2 x - 3 y + 4 z == 7, {x, y, z}, Reals, 5]
{{-22, 8/5, 279/20},
 {-(109/5), 11/5, 143/10},
 {8/5, 2, 49/20},
 {42/5, 82/5, 197/20},
 {149/10, -(11/2), -(393/40)}}
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
ciao
  • 25,774
  • 2
  • 58
  • 139
  • Thanks, that's exactly what I needed! – Henry Feb 01 '14 at 05:02
  • 1
    Since Henry said "I don't actually care what the values of y and z are" I am editing this to leave out those conditions, and show the output. (+1 of course.) – Mr.Wizard Feb 01 '14 at 08:03
0

https://en.wikipedia.org/wiki/Point_on_plane_closest_to_origin

In Euclidean space, the point on a plane ax + by + cz = d that is closest to the origin has the Cartesian coordinates (x,y,z), where:

x = ad/(a^2+b^2+c^2)

y = bd/(a^2+b^2+c^2)

z = cd/(a^2+b^2+c^2)

Since you know a=2, b=-3, c=4, and d=-7, you can get {x,y,z} on your plane using these three equations.

Sparr
  • 209
  • 1
  • 4
  • I guess that does give a point, and I could translate it into Mathematica. But this is not really what the question was asking. This works great though: FindInstance[2 x - 3 y + 4 z == 7, {x, y, z}] – Henry Feb 01 '14 at 05:01