smi...@gmail.com (or should I address you as /c?),

Your statement of the problem is similar to what I worked out for the 
"circular" solution using sine & cosine.  The equations I provided have q1 
and q2 as quadrances (the squares of the distances) whereas your 
description treats them as distances (as did my circular solution).  The 
rational trigonometry solution is based strictly off of triangles with the 
quadrances of their sides and the spreads between them.

I understand that this is very convoluted when compared to the traditional 
trigonometry that most of us have used before.  Though it's probably more 
than most want to spend time 
with, https://web.maths.unsw.edu.au/~norman/papers/Chapter1.pdf describes a 
bit on why the author thinks the rational trigonometry has advantages.

On Saturday, August 6, 2022 at 10:59:19 AM UTC-7 smi...@gmail.com wrote:

> I would state the problem as:
>
> D is the intersection of Segment((0,0),(q1,0)), rotated ccw angle s about 
> Point(0,q2), and the Line((q1,0),slope=m), where m < M and M is the slope 
> of the line tangent to Circle((0,q2),q2) that passes through Point(q1,0). 
> (If the line has a less negative slope then the segment will no longer 
> intersect it.) What is the relationship between D and s in terms of q1 and 
> q2?
>
> /c
>
> On Saturday, August 6, 2022 at 12:45:30 PM UTC-5 klp...@gmail.com wrote:
>
>> Drat, when I downloaded the file Chrome treated it as text.  I did a 
>> "save as" to text to my drive and renamed the file to RationalSoln.html.  I 
>> then pointed my browser to the renamed file and it comes up as expected.  
>> YMMV.
>>
>> On Saturday, August 6, 2022 at 10:41:36 AM UTC-7 Kevin Pauba wrote:
>>
>>> I do have a jupyter notebook but I suppose that might not be easily 
>>> digested by many.  Maybe a good compromise is the attached HTML (you might 
>>> have to download it and point your browser to the static file).  That may 
>>> allow you to pull out the sympy code I used to derive equ1 I presented 
>>> earlier.  Those pure math type folks might find the latex-derived equation 
>>> easier on the eyes.
>>>
>>> Let me know how else I can make it easier for you (and others) to 
>>> contribute.
>>>
>>> On Saturday, August 6, 2022 at 9:33:41 AM UTC-7 brombo wrote:
>>>
>>>> Do you have a write up to go with the picture so I can understand 
>>>> exactly what are the inputs to the problem and what you are trying to 
>>>> solve for (I am less clear on the input parameters than what you are 
>>>> solving for).  There may be a way of using 2D conformal geometric 
>>>> algebra to solve the problem. 
>>>>
>>>> On 8/6/22 12:14 PM, Oscar Benjamin wrote: 
>>>> > The equations you are attempting to solve lead to a very complicated 
>>>> > Groebner basis that is slow to compute (I'm not sure how long it 
>>>> > takes) and probably gives quite a complicated expression for the 
>>>> > solution. 
>>>> > 
>>>> > It might be better if you can derive the equations without 
>>>> introducing 
>>>> > radicals i.e. to work with the quadrances rather than square rooting 
>>>> > them to get lengths. I'm not sure how you derived this but I imagine 
>>>> > the intention of rational geometry is to avoid things like square 
>>>> > roots. 
>>>> > 
>>>> > On Sat, 6 Aug 2022 at 16:22, Kevin Pauba <klp...@gmail.com> wrote: 
>>>> >> That might be another approach but this represents an applied 
>>>> geometry problem (mechanics). The segment DP (along with s) is an input 
>>>> measure that is easy to determine/specify. 
>>>> >> 
>>>> >> On Saturday, August 6, 2022 at 4:45:13 AM UTC-7 smi...@gmail.com 
>>>> wrote: 
>>>> >>> 
>>>> >>> Kevin, I took a look at some of the rational geometry links -- it 
>>>> makes me wonder if you might approach the relationship between Q1 and Q2 
>>>> and the area of the triangle extending past the line instead of simply the 
>>>> length DP. 
>>>> >>> 
>>>> >>> /c 
>>>> >>> On Friday, August 5, 2022 at 9:11:39 PM UTC-5 klp...@gmail.com 
>>>> wrote: 
>>>> >>>> Hi Oscar, 
>>>> >>>> 
>>>> >>>> That very well may be (as you've noticed, I'm not well versed in 
>>>> math as I once was). This is an applied geometry problem (see attached 
>>>> diagram) where the triangle rotates about point A. I am solving for the 
>>>> relationships between q1 and q2, the perpendicular distance from P to the 
>>>> base of the triangle (segment DP) and the angular measure s using rational 
>>>> trigonometry (see https://stijnoomes.com/laws-of-rational-trigonometry/). 
>>>> I have a solution using sin, cos but I'm interested in this alternative 
>>>> method. 
>>>> >>>> 
>>>> >>>> equ1 in my working example solves for the segment DP given q1, q2 
>>>> and s (and angular measure). The problem presented here is to determine q1 
>>>> and q2 given two known segments and angular measures (q_dp1, s1) and 
>>>> (q_dp2, s2). 
>>>> >>>> 
>>>> >>>> I hope this makes sense and that the information might help you 
>>>> help me. 
>>>> >>>> 
>>>> >>>> Thanks for taking the time looking into it! 
>>>> >>>> 
>>>> >>>> On Friday, August 5, 2022 at 4:50:09 PM UTC-7 Oscar wrote: 
>>>> >>>>> I just had a quick look and I think that maybe this has a 
>>>> positive 
>>>> >>>>> dimensional solution set. 
>>>> >>>>> 
>>>> >>>>> On Fri, 5 Aug 2022 at 16:08, Kevin Pauba <klp...@gmail.com> 
>>>> wrote: 
>>>> >>>>>> Here's the minimal working example (except for it hanging on 
>>>> solve()): 
>>>> >>>>>> 
>>>> >>>>>> import sympy as sym 
>>>> >>>>>> from sympy import sqrt 
>>>> >>>>>> 
>>>> >>>>>> q1, q2, s, s1, s2, q_dp1, q_dp2 = sym.symbols('Q_1, Q_2, s, s_1, 
>>>> s_2, Q_dp_1, Q_dp_2') 
>>>> >>>>>> 
>>>> >>>>>> equ1 = q1*s - q2*s + 2*q2 - 2*sqrt(q2*(q1*s - q2*s + q2 + 
>>>> 2*sqrt(q1*q2*s*(1 - s)))) + 2*sqrt(q1*q2*s*(1 - s)) 
>>>> >>>>>> 
>>>> >>>>>> eq1 = equ1.subs({ s: s1 }) - q_dp1 
>>>> >>>>>> print(f"{eq1} = 0") 
>>>> >>>>>> 
>>>> >>>>>> eq2 = equ1.subs({ s: s2 }) - q_dp2 
>>>> >>>>>> print(f"{eq2} = 0") 
>>>> >>>>>> 
>>>> >>>>>> soln = sym.solve([eq1, eq2], (q1, q2), simplify=False) 
>>>> >>>>>> print(f"soln = {soln}") 
>>>> >>>>>> 
>>>> >>>>>> On Friday, August 5, 2022 at 7:47:07 AM UTC-7 Oscar wrote: 
>>>> >>>>>>> You should be able to obtain a parametric Groebner basis to 
>>>> represent 
>>>> >>>>>>> the solutions of this system. Whether that leads to an explicit 
>>>> >>>>>>> solution in radicals is hard to say without trying. 
>>>> >>>>>>> 
>>>> >>>>>>> I would demonstrate how to do this but the code for putting 
>>>> together 
>>>> >>>>>>> the equations is incomplete. 
>>>> >>>>>>> 
>>>> >>>>>>> On Fri, 5 Aug 2022 at 14:01, Chris Smith <smi...@gmail.com> 
>>>> wrote: 
>>>> >>>>>>>> If you remove the radicals 
>>>> (`sympy.solvers.solvers.unrad(eq1)`) and replace `Q1` and `Q2` with `x` 
>>>> and 
>>>> `y` and `Q_dp_1` with a and `s1` with `b` you will get an expression that 
>>>> is of degree 4 in every variable and can be split into a term with `a` and 
>>>> `b` and a term with only `b` -- both with `x` and `y`. 
>>>> >>>>>>>> 
>>>> >>>>>>>> u1 = a*(a**3 - 4*a**2*y*(2 - b) - 2*a*y**2*(-3*b**2 + 8*b - 8) 
>>>> - 4*b**3*x**3 + 2*b**2*(-x**2*(-3*a + 2*y*(b - 2)) + 2*y**3*(b - 2)) - 
>>>> 4*b*x*(a**2 + a*y*(b - 2) + y**2*(-b**2 - 8*b + 8))) + \ 
>>>> >>>>>>>> b**2*(b*(x**2 + y**2) + 2*x*y*(b - 2))**2 
>>>> >>>>>>>> 
>>>> >>>>>>>> Replace a,b with c,d (for `q_dp_2` and `s2`) to get `u2`. I 
>>>> can't imagine that solving a pair of quartics is going to give a nice 
>>>> solution. But solving this system with known values for `a` and `b` would 
>>>> be straightforward with `nsolve`. 
>>>> >>>>>>>> 
>>>> >>>>>>>> /c 
>>>> >>>>>>>> 
>>>> >>>>>>>> On Thursday, August 4, 2022 at 11:54:24 PM UTC-5 
>>>> klp...@gmail.com wrote: 
>>>> >>>>>>>>> And eq1=Q_1*s_1 - Q_2*s_1 + 2*Q_2 - Q_dp_1 - 
>>>> 2*sqrt(Q_2*(Q_1*s_1 - Q_2*s_1 + Q_2 + 2*sqrt(Q_1*Q_2*s_1*(1 - s_1)))) + 
>>>> 2*sqrt(Q_1*Q_2*s_1*(1 - s_1)) ... sorry, long day! 
>>>> >>>>>>>>> 
>>>> >>>>>>>>> On Thursday, August 4, 2022 at 9:39:53 PM UTC-7 Kevin Pauba 
>>>> wrote: 
>>>> >>>>>>>>>> Sorry, Jeremy. Good suggestion! 
>>>> >>>>>>>>>> 
>>>> >>>>>>>>>> s1, s2, q_dp1, q_dp2 = sym.symbols('s_1, s_2, Q_dp_1, 
>>>> Q_dp_2') 
>>>> >>>>>>>>>> eq1 = equ1.subs({ s: s1 }) - q_dp1 
>>>> >>>>>>>>>> md( "$" + sym.latex(eq1) + " = 0$\n" ) 
>>>> >>>>>>>>>> 
>>>> >>>>>>>>>> eq2 = equ1.subs({ s: s2 }) - q_dp2 
>>>> >>>>>>>>>> md( "$" + sym.latex(eq2) + " = 0$\n" ) 
>>>> >>>>>>>>>> 
>>>> >>>>>>>>>> soln = sym.solve([eq1, eq2], q1, q2) 
>>>> >>>>>>>>>> print(f"soln = {soln}") 
>>>> >>>>>>>>>> 
>>>> >>>>>>>>>> I'll set simplify to False and see how it goes ... 
>>>> >>>>>>>>>> On Thursday, August 4, 2022 at 8:18:00 PM UTC-7 Kevin Pauba 
>>>> wrote: 
>>>> >>>>>>>>>>> I've attached a portion of a jupyter notebook. I'm 
>>>> attempting to solve a simultaneous equation using sympy. The sym.solve() 
>>>> in 
>>>> the green input box doesn't return (well, I waited over night on my 
>>>> macbook 
>>>> pro). Might the solution be intractable? Is there another way to get a 
>>>> solution? Any help is greatly appreciated. 
>>>> >>>>>>>> -- 
>>>> >>>>>>>> You received this message because you are subscribed to the 
>>>> Google Groups "sympy" group. 
>>>> >>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>> it, send an email to sympy+un...@googlegroups.com. 
>>>> >>>>>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/sympy/72f1b075-dbe2-41c0-bba6-9305c5960443n%40googlegroups.com.
>>>>  
>>>>
>>>> >>>>>> -- 
>>>> >>>>>> You received this message because you are subscribed to the 
>>>> Google Groups "sympy" group. 
>>>> >>>>>> To unsubscribe from this group and stop receiving emails from 
>>>> it, send an email to sympy+un...@googlegroups.com. 
>>>> >>>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/sympy/54eddcdc-a42e-4ebc-87b8-b6aaea1e2d0an%40googlegroups.com.
>>>>  
>>>>
>>>> >> -- 
>>>> >> You received this message because you are subscribed to the Google 
>>>> Groups "sympy" group. 
>>>> >> To unsubscribe from this group and stop receiving emails from it, 
>>>> send an email to sympy+un...@googlegroups.com. 
>>>> >> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/sympy/357f1ceb-d50f-484f-ae1e-0c82a1414a62n%40googlegroups.com.
>>>>  
>>>>
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/09add098-f173-4fae-8cf1-90e65d3cfc93n%40googlegroups.com.

Reply via email to