this is exactly what I had in mind. Catmull-clark will give you a volume 
loss, but in this case, it might be just what you're looking for. 

Le mardi 13 octobre 2020 à 02:48:11 UTC-4, Marcus Ottosson a écrit :

> Just wanted to chime in and say thanks for sharing, love the illustrations.
>
> I wonder if catmull-clark is relevant here? I came across this video 
> recently which covers implementation in a C-like language (Houdini's VEX).
>
> - https://vimeo.com/457274458
>
> On Mon, 12 Oct 2020 at 21:59, Kevin C. Burke <kevin...@gmail.com> wrote:
>
>> I have been able to find points A, B, & C in this image:
>> [image: Start_and_End_Angle.jpg] 
>>
>> Here is my pymel that creates locators for V1, V2, & V3, then solves for 
>> A, B, & C.:
>> import pymel.core as pm,math
>> import pymel.core.datatypes as dt
>>
>> r = 1.5 #radius
>> V1 = dt.Vector(1, 2, 0)
>> V2 = dt.Vector(2, 6, 0)
>> V3 = dt.Vector(7, 7, 0)
>> V1L = pm.spaceLocator( p=V1, n="v1", a=True )
>> V2L = pm.spaceLocator( p=V2, n="v2", a=True )
>> V3L = pm.spaceLocator( p=V3, n="v3", a=True )
>> a = V2-V1
>> b = V2-V3
>> a.normalize()
>> b.normalize()
>> halfang = math.acos((a.dot(b)))/2
>> ab = (a+b)/2
>> ab.normalize()
>> A = V2 - r/math.tan(halfang)*a;
>> B = V2 - r/math.tan(halfang)*b;
>> C = V2 - r / math.sin(halfang) * ab
>>
>> AL = pm.circle( c=A, r=0.3, nr=(0, 0, 1), n="A" )
>> BL = pm.circle( c=B, r=0.3, nr=(0, 0, 1), n="B" )
>> CL = pm.circle( c=C, r=0.3, nr=(0, 0, 1), n="C" )
>>
>> I am seeking help in determining the positions of a specified number of 
>> points in the arc labeled 'Arc B' between A & C.
>>
>>
>> On Monday, October 12, 2020 at 11:04:34 AM UTC-7 Kevin C. Burke wrote:
>>
>>> Hello,
>>> I'd like to procedurally bevel an edge loop for a polygon object plugin 
>>> that I am making. I am seeking help in coding an algorithm that does this 
>>> using Python (not using any API method like polyBevel 
>>> <https://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/PyMel/generated/functions/pymel.core.modeling/pymel.core.modeling.polyBevel.html?highlight=polybevel>
>>> ).
>>>
>>> So far in my research, it appears to be a matter of mathematically 
>>> generating an arc of points between two points [P1, P2] based on their 
>>> distance from a third angular point [P] and a radius.
>>> [image: B1ifD.gif]
>>>
>>> [image: Bevel.gif]
>>>
>>> I found this post from Stack Overflow 
>>> <https://stackoverflow.com/questions/24771828/algorithm-for-creating-rounded-corners-in-a-polygon/24780108#24780108>
>>>  
>>> about rounding corners using the C# & math. In an attempt to understand it, 
>>> I created this <https://codepen.io/blastframe/pen/gOMbEQj>, my 
>>> translation to Javascript & HTML Canvas. I'm unable to get the arc of 
>>> points to meet at the right positions consistently though as I do not 
>>> entirely understand the math.
>>>
>>> Can anyone provide guidance for generating this arc of points based on 
>>> three points please? Thank you!
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to python_inside_m...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/python_inside_maya/fe4ad6be-9f0c-418f-99f8-3968f6a6e0dan%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/fe4ad6be-9f0c-418f-99f8-3968f6a6e0dan%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/cfb14ff2-5b55-40b5-8fe2-34f9e4572688n%40googlegroups.com.

Reply via email to