40 Reputation

3 Badges

1 years, 150 days

MaplePrimes Activity

These are replies submitted by mugwort

@acer cheers mate, this did the trick, yes indeed I'll be looking at finding the x difference such that the line meets the nearest boundary curve, but first I've somehow got to solve these equations!


Regarding my second point, do you think it's worth turning the expressions into operators? I ask because it seems bad practice to do something like

plot[ subs(s=some value, x[eq]) * x[eq], s=0..5 ]

So I'm not sure whether to make it use a different parameter instead of using s for the value substituted to find the gradient at that point, as well as the parameter for actually traversing along the gradient line.


Anyway, many thanks for your help!

@Joe Riel Clever solution! This looks a little more concise and easier to read, though would I be right in assuming its no easier to find the 2 values of t for which the edge curve intersects itself?

@dharr Super! arctan(-diff(fy,t),diff(fx,t)) did indeed remove the swapping of the edges which was exactly what I needed, now I just to find the t1 and t2 where the edges cross themselves!

@Carl Love Nice one cheers mate

@tomleslie super, thanks mate, it was the assume function I was looking for.

What put me off using displayprecision was that say if it was set to 3, then a value of 0.000234 would be displayed as 0.000. I guess this isn't too much of a problem since the actual value is still stored precisely, though it would be nice if there was a way to make it work on significant figures rather than decimal places.

Cheers though, I appreciate the tidy up


Sorry to bug you again bud, but the original problem has returned.. the only thing I have changed is replacing all of the decimals to rationals in the definition of p in an attempt to make terms cancel as I would like.. this worked, however, now the csgn function has reappeared. Here's the new workspace if you fancy a look


Also just out of curiousity, it would be nice to know why the cancellation of terms only works nicely when using rational representations rather than decimals with the equivalent value, as it would be nice to know that no nasty rounding is going to occur due to them being integer divisions.

Thanks again

@acer will do

@Kitonum Cheers mate, not sure why that fixed that exactly but that did the trick, also made my precision look a lot nicer too, thanks!

@Kitonum I understand that code may be a pain to read so here's the workspace, thanks again!


Cheers, though I should have been more clear, I was expecting a way to declare the variable x as a real indepently, as I'm not calling the csgn directly, it's inserted by one of my functions:

The last kappa function is simply the magnitude of the vector of the line above, when I try 

kappa(p) assuming real; 

I get a division by 0 error for some reason. Not sure where I should place the statement..

@Carl Love That did the trick, thanks a lot.

Then restricting the domain and repeating for the positives:

And I get a lovely double root surface, thanks again!

@acer Great answer, thanks a lot!

@acer Yeah I did, don't think it will take strings as them though, ah well I'll let them be numbers, cheers anyhow.

@Carl Love 
Good to know, thank you


Both useful solutions to the problem!

1 2 Page 1 of 2