gle, y the point
NB. round "under" expression as Re Im vector
rotate=: [: round&.:+. (* [: ^ [: j. [: %/ ,&(360 , TAU))~
15 rotate 22j10
19j15
Date: Thu, 7 Dec 2023 11:48:26 -0500
From: "'PMA' via Programming"
To:programm...@jsoftware.com
Subj
rotate=: [: round&.:+. (* [: ^ [: j. [: %/ ,&(360 , TAU))~
15 rotate 22j10
19j15
Date: Thu, 7 Dec 2023 11:48:26 -0500
From: "'PMA' via Programming"
To:programm...@jsoftware.com
Subject: Re: [Jprogramming] A Dot-Graph Rotator
Message-ID:<370d931d-42eb-6de0-6a75-3454b0d0c...
Thanks Raul. Interesting -- I'll look into the polar too
On 12/7/23 13:51, Raul Miller wrote:
Or, more simply
22j10*^j.o.15%180
18.6622j15.3533
That said, you could also use J's notation for entering complex
numbers using polar coordinates
22j10*1ad15
18.6622j15.3533
I hope this mak
Or, more simply
22j10*^j.o.15%180
18.6622j15.3533
That said, you could also use J's notation for entering complex
numbers using polar coordinates
22j10*1ad15
18.6622j15.3533
I hope this makes sense,
--
Raul
On Thu, Dec 7, 2023 at 12:20 PM Henry Rich wrote:
>
> 22j10 (* ^@:j.@:o.&(
Just right. I've got it as
rotate =: 4 : 0
<. 0.5 + x (* ^@:j.@:o.&(%&180)) y
)
Yaaay. Thanks, Henry!
P
On 12/7/23 12:20, Henry Rich wrote:
22j10 (* ^@:j.@:o.&(%&180)) 15
18.6622j15.3533
Make the middle part a named verb if you like.
Henry Rich
On 12/7/2023 11:48 AM, 'PMA' via Prog
22j10 (* ^@:j.@:o.&(%&180)) 15
18.6622j15.3533
Make the middle part a named verb if you like.
Henry Rich
On 12/7/2023 11:48 AM, 'PMA' via Programming wrote:
A slightly different approach. Rather than search out all alignments
and then deduce their degrees of rotation, I mean now to specify
A slightly different approach. Rather than search out all alignments
and then deduce their degrees of rotation, I mean now to specify as
input the degrees for which rotations are to be generated.
Example: given a graph of one dot -- 22j10 -- I'd input that value with
a rotation choice -- 15 d
The keyword you would need to looking for is "affine transformation"
https://en.wikipedia.org/wiki/Affine_transformation
Where image rotation is just a special case
[ cos(theta) -sin(theta) 0 ]
[ sin(theta) cos(theta) 0 ]
[ 00 1 ]
And you can combine with other linear tr
]pts =. _2 ]\ 1 1 2 2 3 4 NB. points as (x,y)
1 1
2 2
3 4
]zpts =. j./ |: pts NB. points in complex plane
1j1 2j2 3j4
zorigin =. 0j0
NB. verb to rotate points y counterclockwise by angle x
rot =. {{ zorigin + (y-zorigin) * ^ j. x }}"0 _
NB. Get the angles to use. Each
This sounds like you would want to convert the points to polar
representation:
https://code.jsoftware.com/wiki/User:Devon_McCormick/PolarCartesianConversion
.
On Thu, Nov 16, 2023 at 9:47 AM 'PMA' via Programming <
programm...@jsoftware.com> wrote:
> Hi Henry,
>
> Chris Burke advised me to re-sen
Hi Henry,
Chris Burke advised me to re-send my original question to this Forum.
Sorry for the duplication.
PA
On 11/16/23 09:39, PMA wrote:
Thank you for these! Will pursue...
PA
On 11/16/23 09:26, Henry Rich wrote:
This is my reply to a question someone posed yesterday. This
afternoon
Thank you for these! Will pursue...
PA
On 11/16/23 09:26, Henry Rich wrote:
This is my reply to a question someone posed yesterday. This
afternoon I will post a complete solution. It's like the puzzle
problems I posed you, but just a little longer and comes from a real
user need. If you w
This is my reply to a question someone posed yesterday. This afternoon
I will post a complete solution. It's like the puzzle problems I posed
you, but just a little longer and comes from a real user need. If you
want to solve it yourself you will need the primitives
j. dyad, / monad, / dyad
I would find the angles from each point to each other point, take
modulus(pi/2), concatenate the list with its negative, and sort.
Rotation by each angle produces a new alignment. Only J primitives are
needed.
Use complex numbers to represent the (x,y) values, and *. to convert to
angles.
14 matches
Mail list logo