Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //: Vertical Intersection Of Point And Circle
- //: www.twitch.com/kanjicoder
- //: https://www.etsy.com/shop/DekTen
- //: ANIMATED_GIF_OF_THIS_CODE: https://imgur.com/gallery/wIPuIES
- //:COPIED_FROM[ R:\G\UP\MSB\SBF.SCAD ]===================://
- //:Circle_Line_Intersect:VERTICAL_RAY_FROM_POINT
- function SBF_CliVer(
- p_t
- , cen
- , rad
- )=([
- p_t[0] //:X_IS_SAME_FOR_VERTICAL_INTERSECTION
- ,
- ( //:<<<<<<< h_y:HIT_Y(intersection_y)
- ( cen[1]+SBF_IGT(p_t[1],cen[1])*sin( //:C_F:BEG
- acos((p_t[0]-cen[0])/rad) //:__ANG__
- )*rad ) //:<<<<<<<<<<<<<<<<<<<<<<<<<<<:C_F:END
- ) //:<<<<<<< h_y:HIT_Y(intersection_y)
- ]);;
- //: IGT:Is_Greater_Than:
- //: TRUE: Return 0+1
- //: FALSE: Return 0-1
- function
- SBF_IGT( p_t , cen )=(
- p_t >= cen ? 0+1 :
- p_t < cen ? 0-1 : 0
- );;
- //:==================:COPIED_FROM[ R:\G\UP\MSB\SBF.SCAD ]://
Add Comment
Please, Sign In to add comment