[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Shiv Shankar Dayal
Can we please add
https://github.com/jemmybutton/byrne-euclid/blob/master/byrne.mp to Wiki
because files have a tendency to disappear?
Similarly, can we please add
https://github.com/thruston/Drawing-with-Metapost/blob/main/Drawing-with-Metapost.pdf
file to Wiki?
-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Shiv Shankar Dayal
The fiziko library by the same author is also very interesting:
> https://github.com/jemmybutton/fiziko
> Since it has some pseudo-3D features, maybe you can learn from it.
>

Thanks for all this info. I will look into this and perhaps come up with a
Metapost file, and then we can possibly add that in Wiki.
I do not know Lua, and I am too old to learn another programming language.
These days, I program only in Rust/Javascript.

-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Henning Hraban Ramm

Am 13.01.24 um 15:54 schrieb Gavin via ntg-context:

One pretty MetaPost drawing option is the byrne package by Sergey Slyusarev, 
which he used (with ConTeXt) to reproduce Oliver Byrne’s 1847 quirky edition on 
the first six books of Euclid’s “Elements”. All of the drawing is in MetaPost, 
and would work with MetaFun (I think). The LaTeX package is in TeX Live, and 
the ConTeXt version is at https://github.com/jemmybutton/byrne-euclid/.


The fiziko library by the same author is also very interesting:
https://github.com/jemmybutton/fiziko
Since it has some pseudo-3D features, maybe you can learn from it.

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-13 Thread Gavin via ntg-context
Hi Shiv,

The author of tikz-euclide has another package, tikz-elements, which looks like 
it could be used to do all of these calculations for MetaFun.

The tikz-elements package, in spite of its name, appears to contain exactly one 
line of TikZ code. This line is in the very simple style file, 
tkz-elements.sty. Everything else is written in Lua. I think we could write a 
simple ConTeXt environment file that would replace tkz-elements.sty, making all 
of the tikz-elements package available for MetaFun rather than TikZ.

This would not give you the pretty drawing features of tikz-euclide, since 
those features really are written in TikZ. I do not know of a MetaPost package 
that does the same thing, but there might be one.

One pretty MetaPost drawing option is the byrne package by Sergey Slyusarev, 
which he used (with ConTeXt) to reproduce Oliver Byrne’s 1847 quirky edition on 
the first six books of Euclid’s “Elements”. All of the drawing is in MetaPost, 
and would work with MetaFun (I think). The LaTeX package is in TeX Live, and 
the ConTeXt version is at https://github.com/jemmybutton/byrne-euclid/.

Gavin


> On Jan 12, 2024, at 6:27 PM, Shiv Shankar Dayal  
> wrote:
> 
> 
> No library that I know of, but drawing tangents (and therefore, 
> perpendiculars) is straight-forward:
> 
>https://tex.stackexchange.com/a/108060/323
> 
> Circumcircle, orthocenter, etc... are you thinking of triangles or general 
> polynomails?
> 
> Triangles. I understand that most of it is very easy, but still a library 
> will help new users.
> Tikz has Tikz-Euclide and Asymptote has a Geometry package. A similar library 
> for Metafun
> will be very useful.
>  -- 
> Respect,
> Shiv Shankar Dayal
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-12 Thread Shiv Shankar Dayal
> No library that I know of, but drawing tangents (and therefore,
> perpendiculars) is straight-forward:
>
>https://tex.stackexchange.com/a/108060/323
>
> Circumcircle, orthocenter, etc... are you thinking of triangles or general
> polynomails?
>

Triangles. I understand that most of it is very easy, but still a library
will help new users.
Tikz has Tikz-Euclide and Asymptote has a Geometry package. A similar
library for Metafun
will be very useful.

-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-12 Thread Aditya Mahajan
On Fri, 12 Jan 2024, Shiv Shankar Dayal wrote:

> Do we have a geometry library for common operations like finding tangents,
> perpendiculars, circumcircle, orthocenters and such?

No library that I know of, but drawing tangents (and therefore, perpendiculars) 
is straight-forward:

   https://tex.stackexchange.com/a/108060/323

Circumcircle, orthocenter, etc... are you thinking of triangles or general 
polynomails?

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-12 Thread Shiv Shankar Dayal
Dear Gavin,

I have managed to create an implementation for these operations which I
think I can convert into functions and put in startMPinclusions and then
use them from. there.

On Fri, Jan 12, 2024 at 9:42 PM Gavin via ntg-context 
wrote:

> Hi Shiv,
>
> > Do we have a geometry library for common operations like finding
> tangents, perpendiculars, circumcircle, orthocenters and such?
>
> I don’t think we have anything like that specifically in the MetaFun
> world, but if there is a MetaPost package you like, you can use it with
> MetaFun. For example, the TeX Live installation includes both ConTeXt and
> 3dgeom.mp, so you should be able to use the 3dgeom package in MetaFun
> simply with "input 3dgeom" in your MetaPost code. (I did a quick check,
> successfully drawing a drawing a cube with 3dgeom. I have not tested it
> beyond than that.)
>
> If there isn’t a MetaPost package for what you want, Lua may be useful for
> doing the calculations.
>
> Gavin
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>


-- 
Respect,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Do we have a geometry library for Metafun?

2024-01-12 Thread Gavin via ntg-context
Hi Shiv,

> Do we have a geometry library for common operations like finding tangents, 
> perpendiculars, circumcircle, orthocenters and such?

I don’t think we have anything like that specifically in the MetaFun world, but 
if there is a MetaPost package you like, you can use it with MetaFun. For 
example, the TeX Live installation includes both ConTeXt and 3dgeom.mp, so you 
should be able to use the 3dgeom package in MetaFun simply with "input 3dgeom" 
in your MetaPost code. (I did a quick check, successfully drawing a drawing a 
cube with 3dgeom. I have not tested it beyond than that.)

If there isn’t a MetaPost package for what you want, Lua may be useful for 
doing the calculations.

Gavin
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___