From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/114044 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith McKay via ntg-context Newsgroups: gmane.comp.tex.context Subject: Radius attribute and scaling in lmt_shade[ ] Date: Thu, 6 Jan 2022 15:57:01 +0000 Message-ID: <139b90cc-58cc-b0a5-28fe-153caca91452@gmail.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6236706902786732356==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30595"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Cc: Keith McKay To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 06 16:57:38 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5V90-0007ll-Mr for gctc-ntg-context-518@m.gmane-mx.org; Thu, 06 Jan 2022 16:57:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 93CDA289018; Thu, 6 Jan 2022 16:57:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QlylhaT2pDcR; Thu, 6 Jan 2022 16:57:12 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 595AF283232; Thu, 6 Jan 2022 16:57:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D0DFB283232 for ; Thu, 6 Jan 2022 16:57:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UaFoxAYQceSd for ; Thu, 6 Jan 2022 16:57:09 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.42; helo=mail-wm1-f42.google.com; envelope-from=mckaymeister@gmail.com; receiver= Original-Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id F342A280895 for ; Thu, 6 Jan 2022 16:57:08 +0100 (CET) Original-Received: by mail-wm1-f42.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so2838710wmb.1 for ; Thu, 06 Jan 2022 07:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:to:from:subject; bh=RmLB/vySJlhOwD0I5opCZLLCrligU0jUL3Bx3Hzr9yg=; b=eoGl8TQpnXyPXctmvWsLx0ZofjmBuqPkDaFvxNNa/qxVUxMlAtuA5V5ERf49R86liM htH1Z4O68TgirU9kRuZvL5igKaBifDuJMgx1inx9J4s4fIEo0Uwjcq6H47iz5TLVIT99 E/CAvMVKyKon4ooEzsDuwHHxyHcuMsU59Oc+MrH3QC0VCviEFwlkXpjISi7iEP/4CS9C NXOA51CSIulQAaE+/WQBezDxwWMVgtvu449295yJhAcvgwqp2j5TTuFZVC+mksQ0+rhj 6RIYlqWmqWd0dM01mgT7i0apzuju1qaLkru8jruwtEg3Zpz+5soX9NmakJd1pNy/7O6z Zu1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:to:from :subject; bh=RmLB/vySJlhOwD0I5opCZLLCrligU0jUL3Bx3Hzr9yg=; b=hMWE5NC+ZFdLvR/fIrdy94kFU65TiDO4jIASQc5bLNjiRZIHrJKqVSZdBPdPsvBY8q PEUthAyC9eKOdAA6BK6X7dgpBR3AQuIIAAXM0mwxU6Ngz9By2sB0ChjmaHBmyG4ouMy5 X3hZrjgJy6AyIuk6fdI7WdqQQlHgIVCElON/YCQdFOy92cZ5Qe0MVSeB1WraX16yFJgu rWfCFUexwXD2bXo3VMH4IFYIB6OFkBv6IhFAti1SPrsgpd5cYDc89LvW66c66bb9/dug 8wUVNAJoqZGAoao3lD/95qmrlGSR50Nkyb2MoAZcHxfTXgRDKG0i5A8qhzW9o0qxW6xd hJOQ== X-Gm-Message-State: AOAM532XShENQnARNkjNI+K1gbksEGJztfW9QcQfUaj5ZzEkL50yOyY8 pkil0x/3l63PwJ9VujDfP6Zg5zHVZDJMXQ== X-Google-Smtp-Source: ABdhPJwR1yQCvJqmPHRom610M+y2EG6wLK94LJ2lIllz5e0yvSnCqlAE2WVGIOrStKLCyKgHZpgJ4w== X-Received: by 2002:a05:600c:1990:: with SMTP id t16mr7540368wmq.87.1641484628318; Thu, 06 Jan 2022 07:57:08 -0800 (PST) Original-Received: from [192.168.0.14] (cpc100594-uddi29-2-0-cust51.20-3.cable.virginm.net. [82.42.107.52]) by smtp.gmail.com with ESMTPSA id s8sm2792380wra.9.2022.01.06.07.57.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jan 2022 07:57:07 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:114044 Archived-At: This is a multi-part message in MIME format. --===============6236706902786732356== Content-Type: multipart/alternative; boundary="------------OWiPvxBd0R7p3tsnkbnBBl4h" This is a multi-part message in MIME format. --------------OWiPvxBd0R7p3tsnkbnBBl4h Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi In the code below you will see that I have created a closed path and performed scaling, and shading on the path with lmt_shade [ ]. I have noticed a few features which may or may not be bugs depending on whether scaled is applied to the path within the square brackets or outside. 1) Applying scaled to the path within the square brackets and incrementing the radius key I can see the shaded areas changing, however the first two shapes show incorrect scaling and have ragged edges. 2) When scaled is applied outside the square brackets all shapes are the same size and no ragged edges, however the shading is not showing correctly with increasing radius. Am I missing something? Best Wishes Keith McKay *******************MWE***************** \setuppapersize[A4, landscape] \starttext \dorecurse{10}{ \startMPpage StartPage; width := 27; height := 18; path r; r := (0.25cm,0cm)--(0cm,1.5cm)..(0.25cm,1.75cm)..(0.5cm,1.5cm) -- cycle; definecolor [ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definecolor [ name = "MyColor2", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ;     for k = 0.5 step 0.25 until 2:         draw lmt_shade [             path = r ,             direction = "up",             alternative = "circular",             radius = k*cm,             colors = { "MyColor1", "MyColor2" },             ] scaled 4.5 shifted((k *12)*cm,12*cm);         draw lmt_shade [             path = r scaled 4.5,             direction = "up",             alternative = "circular",             radius = k*cm,             colors = { "MyColor1", "MyColor2" },             ] shifted((k *12)*cm,1cm); endfor; StopPage; \stopMPpage } \stoptext --------------OWiPvxBd0R7p3tsnkbnBBl4h Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi

In the code below you will see that I have created a closed path and performed scaling, and shading on the path with lmt_shade [ ]. I have noticed a few features which may or may not be bugs depending on whether scaled is applied to the path within the square brackets or outside.

1) Applying scaled to the path within the square brackets and incrementing the radius key I can see the shaded areas changing, however the first two shapes show incorrect scaling and have ragged edges.

2) When scaled is applied outside the square brackets all shapes are the same size and no ragged edges, however the shading is not showing correctly with increasing radius.

Am I missing something?

Best Wishes

Keith McKay

*******************MWE*****************

\setuppapersize[A4, landscape]

\starttext

\dorecurse{10}{

\startMPpage

StartPage;

width := 27; height := 18;

path r;

r := (0.25cm,0cm)--(0cm,1.5cm)..(0.25cm,1.75cm)..(0.5cm,1.5cm) -- cycle;

definecolor [ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ;

definecolor [ name = "MyColor2", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ;

    for k = 0.5 step 0.25 until 2:

        draw lmt_shade [

            path = r ,

            direction = "up",

            alternative = "circular",

            radius = k*cm,

            colors = { "MyColor1", "MyColor2" },

            ] scaled 4.5 shifted((k *12)*cm,12*cm);

        draw lmt_shade [

            path = r scaled 4.5,

            direction = "up",

            alternative = "circular",

            radius = k*cm,

            colors = { "MyColor1", "MyColor2" },

            ] shifted((k *12)*cm,1cm);

endfor;

StopPage;

\stopMPpage

}

\stoptext

--------------OWiPvxBd0R7p3tsnkbnBBl4h-- --===============6236706902786732356== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6236706902786732356==--