# Draw plane based on angle to another plane and 2 markup points

**URL:** https://discourse.slicer.org/t/draw-plane-based-on-angle-to-another-plane-and-2-markup-points/29867
**Category:** Development
**Tags:** python
**Created:** [June 6, 2023, 3:39pm UTC](https://discourse.slicer.org/t/draw-plane-based-on-angle-to-another-plane-and-2-markup-points/29867 "2023-06-06T15:39:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Holmes\_Tran](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/holmes_tran/32/66305_2.png) [@Holmes\_Tran](https://discourse.slicer.org/u/Holmes_Tran)
#### Post date: [June 6, 2023, 3:39pm UTC](https://discourse.slicer.org/t/draw-plane-based-on-angle-to-another-plane-and-2-markup-points/29867/1 "2023-06-06T15:39:02Z")

</div>

Hi, I have a predefined plane P1, a line L1 through that plane at an angle A. I’d like to draw a plane P2 that contains L1 and at an angle A with P1.

How can I do that in Python? also, is there any easy way to this using GUI?

Thanks for your time

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 16, 2023, 4:49pm UTC](https://discourse.slicer.org/t/draw-plane-based-on-angle-to-another-plane-and-2-markup-points/29867/2 "2023-06-16T16:49:50Z")

</div>

There is no GUI for this in Slicer, but you can compute the plane position and normal vector fairly easily:

- P2 plane position is the intersection of P1 and L1
- P2 plane normal is the cross product of L1 and L1’, where L1’ is the projection of L1 line on P1 plane
