« first day (208 days earlier)
← previous day
next day →
last day (218 days later) »
ASCII-only
12:11 AM
@ConorO'Brien ok so i'm working on rotateoverlap right now
Conor O'Brien
ok?
ASCII-only
trying to figure out how to slice the lines
wait no
Conor O'Brien
what is rotateoverlap
ASCII-only
working on reflectoverlap, brb looking for line number
okay, starting from line 1742
top_left
is the top left diagonal with a character on it (basically an axis where
x + y = top_left
)
And I'm trying to figure out how to calculate where to slice the
line
@ConorO'Brien
Conor O'Brien
trying to understand
ASCII-only
12:19 AM
btw sorry for bad explanation + mspaint skills
Conor O'Brien
could you give me an example of how this might work?
ASCII-only
@ConorO'Brien wdym
Conor O'Brien
example program using this feature
ASCII-only
reflect overlap?
well
test.py:929
has examples of how it should work
@ConorO'Brien for a challenge submission,
here
Conor O'Brien
ok so I still have no idea how it works or what the problem is >_>
ASCII-only
12:26 AM
so in this case it reflects line to above the axis
the problem is if the overlap is large enough (the reflection is shifted down enough) lines will need to be sliced
Conor O'Brien
pretend I don't know charcoal.
tell me how this works
ASCII-only
idk how to explain, just pretend the line
top_left
is next to is a mirror
Charcoal reflects it across
but there's also a different command that overlaps (moves reflection closer to the axis)
Conor O'Brien
so wait you're not working on rotateoverlap anymore
ASCII-only
@ConorO'Brien no, i got the name wrong
Conor O'Brien
ok
ASCII-only
12:34 AM
i wasn't working on rotateoverlap at all
Conor O'Brien
so from what I understand you have a reflect command and it has the potential to overlap?
ASCII-only
@ConorO'Brien yes
Conor O'Brien
and this is a problem because you haven't defined behaviour for it?
ASCII-only
no, the behavior is defined
I just have no idea how to calculate the index at which the line should be sliced
Conor O'Brien
ok, why should it be sliced? if the line to reflect goes across the mirror?
ASCII-only
12:38 AM
yeah
Conor O'Brien
so how is the line defined?
by endpoints?
ASCII-only
yeah
although in this case we only need the left endpoint (we only need either the right or the left endpoint for any reflection)
Conor O'Brien
how so?
ASCII-only
we use the nearer endpoint to find where we need to start the write
Conor O'Brien
how do you define a reflection with only one endpoint? o_O
ASCII-only
12:46 AM
@ConorO'Brien ?
reflect the nearest point to the axis then reflect the line starting from that point
Conor O'Brien
I don't follow
what is "the axis"
ASCII-only
the line next to
top_left
it's defined as the value of
x+y
or
x-y
depending on the direction of the axis (top left to bottom right, or top right to bottom left)
Conor O'Brien
oh, so its an endpoint plus a motion
ASCII-only
yeah
Conor O'Brien
ok
so, given a motion and an endpoint, determine (a) if the line intersects the mirror and (b) figure out where to cut it off so that it doesn't go past the mirror?
ASCII-only
12:52 AM
@ConorO'Brien yes
Conor O'Brien
ok cool
and in python
is the motion given as a delta x,y pair or what?
ASCII-only
not really
it loops for each line so x is given (reflecting y on a diagonal -> x)
y is calculated from the endpoint of the line and the diagonal (e.g.
top_left
)
btw managed to fix it i think
Conor O'Brien
oh ok
>_>
ASCII-only
but I think I haven't changed the cursor position to factor in overlap yet
« first day (208 days earlier)
← previous day
next day →
last day (218 days later) »
all rooms
Transcript for
Apr
12
Apr '17
13
Apr
15
Charcoal
Discussion and design of Charcoal, a golfing language optimize...
ascii-art
golfing-language
language-design
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile