# matrix.makeShear() using degrees?

**URL:** <https://discourse.threejs.org/t/matrix-makeshear-using-degrees/41029>\
**Category:** Questions\
**Tags:** math, geometry\
**Created:** [August 3, 2022, 2:11pm UTC](https://discourse.threejs.org/t/matrix-makeshear-using-degrees/41029 "2022-08-03T14:11:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bossie](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bossie/32/14371_2.png) [@Bossie](https://discourse.threejs.org/u/Bossie)\
**Post date:** [August 3, 2022, 2:11pm UTC](https://discourse.threejs.org/t/matrix-makeshear-using-degrees/41029/1 "2022-08-03T14:11:54Z")

</div>

I would like to connect 2 meshes neatly together, bot objects are rotated by some degrees: roofCornerDegrees  
Normally it looks like this:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/1/e/1e6436289c77e3d7803813bef62fab31770b00a3.jpeg)

I thougt maybe I could use Matrix4().makeShear(0, 0, 0, (1 / 45) \* roofCornerDegrees, 0, 0) to connect the meshes, but the result is a tiny bit off:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/6/666e8a12cc6e5a3f3172d8f343309c26e443af64.png)

Am I missing something?

---

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [August 3, 2022, 7:34pm UTC](https://discourse.threejs.org/t/matrix-makeshear-using-degrees/41029/2 "2022-08-03T19:34:35Z")

</div>

It seems like you need a construction similar to a frame.

Have a look at [Construction of frames with contour/profile](https://discourse.threejs.org/t/construction-of-frames-with-contour-profile/13490). Possibly you can use it.

* * *

UPDATE:  
Had I forgotten, could also be useful?

From the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315)

[ProfiledContourGeometryMM](https://hofk.de/main/discourse.threejs/2019/ProfiledContourGeometryMM/ProfiledContourGeometryMM.html)  
[ProfiledContourGeometryUVs](https://hofk.de/main/discourse.threejs/2020/ProfiledContourGeometryUVs/ProfiledContourGeometryUVs.html)

---

<div class="post-metadata">

**Author:** ![Bossie](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bossie/32/14371_2.png) [@Bossie](https://discourse.threejs.org/u/Bossie)\
**Post date:** [August 5, 2022, 9:11am UTC](https://discourse.threejs.org/t/matrix-makeshear-using-degrees/41029/3 "2022-08-05T09:11:24Z")

</div>

Thanks for the answer, I fixed it by moving the vertices with some good old math.

And I recently already bumped into the ProfiledContourGeometry function of yours, it looks great and it will highly likely be a great tool for future me, thanks in advance for sharing that function! \<3
