[Jprogramming] paint equilateral triangle in plot
Linda Alvord
lindaalvord at verizon.net
Mon Sep 4 14:26:17 UTC 2017
Raul, How would you explain this?
,i:5
_5 _4 _3 _2 _1 0 1 2 3 4 5
_,i:5
_ _5 _4 _3 _2 _1 0 1 2 3 4 5
Linda
-----Original Message-----
From: Programming [mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Raul Miller
Sent: Saturday, September 2, 2017 1:37 PM
To: Programming forum <programming at jsoftware.com>
Subject: Re: [Jprogramming] paint equilateral triangle in plot
Do you mean like this?
load 'plot'
E=:(%:3) (] <:/ [ - (* |)) _,~_,i:20
'point;aspect 1;pensize 10' plot <"1|.|:($, $ #: I.@,)E
Thanks,
--
Raul
On Sat, Sep 2, 2017 at 1:00 PM, Linda Alvord <lindaalvord at verizon.net> wrote:
>
>
> It has rounded vertices and lumpy sides and uses too much paint.
>
> Experiment with S and pensize.
>
>
>
> load 'plot'
> ]xx=:i:s=:20
> ]yy=:(%:3)+(-%:3)*|xx
> ]D=:|.xx<:/yy
> ]E=:|.0,.(0,D,0),.0
> ]t=:0{$E
> ]x=:t#i.t
> ]y=:(*:t)$i.t
> ]A=: x;y
> ]B=:|:>AI=:($E),"2(,E)#B
> ]J=:|.<"1 |:I
> 'point;aspect 1;pensize 10' plot J
>
> Please share ways to of ways to simplify this. Thanks.
> Linda
>
>
> Linda
>
>
> Experiment with S and pensize.
>
>
>
> load 'plot'
>
> ]xx=:i:s=:20
>
> ]yy=:(%:3)+(-%:3)*|xx
>
> ]D=:|.xx<:/yy
>
> ]E=:|.0,.(0,D,0),.0
>
> ]t=:0{$E
>
> ]x=:t#i.t
>
> ]y=:(*:t)$i.t
>
> ]A=: x;y
>
> ]B=:|:>A
>
> I=:($E),"2(,E)#B
>
> ]J=:|.<"1 |:I
>
> $J
>
> 'point;aspect 1;pensize 10' plot J
>
> Let me know of ways to simplify this. Thanks.
>
>
>
> Linda
>
>
>
> Sent from AOL Mobile Mail
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list