forums.silverfrost.com
Welcome to the Silverfrost forums

Author Message
John-Silver

Joined: 30 Jul 2013
Posts: 1400
Location: Aerospace Valley

 Posted: Sun Jul 26, 2020 5:10 pm    Post subject: %eq to write an Equation on a Graph? is it possible to use the %eq format code 'over the top of' or 'within' (à la DRAW_CHARACTERS@', a %pl graphic area, for superposing a relevant equation ?_________________''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "
PaulLaidler

Joined: 21 Feb 2005
Posts: 6472
Location: Salford, UK

 Posted: Sun Jul 26, 2020 7:37 pm    Post subject: Not at the moment but it is an interesting idea. As it is %eq represents a separate child window with an opaque background. Also, as far as I recall, the symbols are not scalable. So at the moment you could possibly move it to the desired position but it would probably be too big and you would not be able to see the graph behind it.
Kenneth_Smith

Joined: 18 May 2012
Posts: 361
Location: Hamilton, Lanarkshire, Scotland.

Posted: Mon Jul 27, 2020 9:26 am    Post subject:

I did not have much success when I tried using %eq. For division (horizontal bar), where the numerator contains subscripts the horizontal bar runs through the subscripts. For example, the equation for the inductance of a solenoid:
 Code: iw = winio@('%eq[L ={divide {mu}{sub 0}{mu}{sub r}AN{sup 2};len}]',0,0)

Where the denominator contains a superscript the superscript is correctly positioned below the horizontal bar.
 Code: iw = winio@('%eq[h = {divide 1;n{sup 2}}]',0,0)

Because of this when I need to display equations, I have adopted the approach of generating images using another tool (e.g. Word) and importing these images as resources. These can then be copied into the %pl graphics region via the call back function.
John-Silver

Joined: 30 Jul 2013
Posts: 1400
Location: Aerospace Valley

Posted: Sat Aug 01, 2020 12:12 am    Post subject:

Paul wrote
 Quote: ... as far as I recall, the symbols are not scalable. So at the moment you could possibly move it to the desired position but it would probably be too big ...

So, doesn't the width and height (of box around the equation define the size of the equation ?

What is the 'default' size of characters ?

It would also seem important to be able to get the size of the equation generated if one wished to do so. Is that any easy thing to imlement ?

The use if a user-defined font would also appear to be a good enhancement .... but I'm beginning to get carried away with myself a bit ;;;; but wait ...... you've just been put back on lockdown !

'So many things to do , so little time' (or is it the reverse?) appears to be a receding hairline at the mo in Greater M !
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "
John-Silver

Joined: 30 Jul 2013
Posts: 1400
Location: Aerospace Valley

 Posted: Sat Aug 01, 2020 12:16 am    Post subject: You can also see why I was hopeful for the TEX equation facility, which appeared to be hampered by similar limitations - hnot knowing the size of the generated svg image and not being able to crop it without going into the interactive editor; (makes a mental note to go and try that again and see how it works out after the last 'fix') I gues one could do 'ones own thing' in a dedicated drawing surface with lines and text but seems a bit of an overkill when there are severl options out there just witing to be tweaked and utilised. Rotating the equation ould also be desireable (e.g; fi=or a Y-axis label)_________________''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "Last edited by John-Silver on Sat Aug 01, 2020 12:27 am; edited 1 time in total
John-Silver

Joined: 30 Jul 2013
Posts: 1400
Location: Aerospace Valley

Posted: Sat Aug 01, 2020 12:24 am    Post subject:

Ken wrote:
 Quote: For division (horizontal bar), where the numerator contains subscripts the horizontal bar runs through the subscripts

... bug or restriction(design not intended to cater for subscripts in mnumerators, maybe) ?
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT + 1 Hour Page 1 of 1