ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Do we have a geometry library for Metafun?
@ 2024-01-12 14:22 Shiv Shankar Dayal
  2024-01-12 16:06 ` [NTG-context] " Gavin via ntg-context
  2024-01-13  0:07 ` Aditya Mahajan
  0 siblings, 2 replies; 9+ messages in thread
From: Shiv Shankar Dayal @ 2024-01-12 14:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 161 bytes --]

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

-- 
Respect,
Shiv Shankar Dayal

[-- Attachment #1.2: Type: text/html, Size: 372 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-12 14:22 [NTG-context] Do we have a geometry library for Metafun? Shiv Shankar Dayal
@ 2024-01-12 16:06 ` Gavin via ntg-context
  2024-01-12 16:32   ` Shiv Shankar Dayal
  2024-01-13  0:07 ` Aditya Mahajan
  1 sibling, 1 reply; 9+ messages in thread
From: Gavin via ntg-context @ 2024-01-12 16:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gavin

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-12 16:06 ` [NTG-context] " Gavin via ntg-context
@ 2024-01-12 16:32   ` Shiv Shankar Dayal
  0 siblings, 0 replies; 9+ messages in thread
From: Shiv Shankar Dayal @ 2024-01-12 16:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gavin


[-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --]

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 <ntg-context@ntg.nl>
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

[-- Attachment #1.2: Type: text/html, Size: 2612 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-12 14:22 [NTG-context] Do we have a geometry library for Metafun? Shiv Shankar Dayal
  2024-01-12 16:06 ` [NTG-context] " Gavin via ntg-context
@ 2024-01-13  0:07 ` Aditya Mahajan
  2024-01-13  1:27   ` Shiv Shankar Dayal
  1 sibling, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2024-01-13  0:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-13  0:07 ` Aditya Mahajan
@ 2024-01-13  1:27   ` Shiv Shankar Dayal
  2024-01-13 14:54     ` Gavin via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Shiv Shankar Dayal @ 2024-01-13  1:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]

> 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

[-- Attachment #1.2: Type: text/html, Size: 972 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-13  1:27   ` Shiv Shankar Dayal
@ 2024-01-13 14:54     ` Gavin via ntg-context
  2024-01-13 15:56       ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Gavin via ntg-context @ 2024-01-13 14:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gavin

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 <shivshankar.dayal@gmail.com> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-13 14:54     ` Gavin via ntg-context
@ 2024-01-13 15:56       ` Henning Hraban Ramm
  2024-01-13 16:53         ` Shiv Shankar Dayal
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2024-01-13 15:56 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-13 15:56       ` Henning Hraban Ramm
@ 2024-01-13 16:53         ` Shiv Shankar Dayal
  2024-01-13 17:00           ` Shiv Shankar Dayal
  0 siblings, 1 reply; 9+ messages in thread
From: Shiv Shankar Dayal @ 2024-01-13 16:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 464 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 958 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [NTG-context] Re: Do we have a geometry library for Metafun?
  2024-01-13 16:53         ` Shiv Shankar Dayal
@ 2024-01-13 17:00           ` Shiv Shankar Dayal
  0 siblings, 0 replies; 9+ messages in thread
From: Shiv Shankar Dayal @ 2024-01-13 17:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 296 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 663 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-13 17:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-12 14:22 [NTG-context] Do we have a geometry library for Metafun? Shiv Shankar Dayal
2024-01-12 16:06 ` [NTG-context] " Gavin via ntg-context
2024-01-12 16:32   ` Shiv Shankar Dayal
2024-01-13  0:07 ` Aditya Mahajan
2024-01-13  1:27   ` Shiv Shankar Dayal
2024-01-13 14:54     ` Gavin via ntg-context
2024-01-13 15:56       ` Henning Hraban Ramm
2024-01-13 16:53         ` Shiv Shankar Dayal
2024-01-13 17:00           ` Shiv Shankar Dayal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).