Talk:Marching squares: Difference between revisions

Oval of Cassini
(→‎Task needs work: fix blatant mistake on my part)
(Oval of Cassini)
 
(5 intermediate revisions by 2 users not shown)
Line 1:
== Task needs work ==
 
: A comment on a previous version of this page:
 
::'''Incorrect:''' The Julia and Python entries also start with the same q-shaped input. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:43, 30 June 2022 (UTC)
 
Currently, the task description does not allow us to determine whether an implementation is correct.
 
Line 28 ⟶ 23:
0 1 1 1 0</pre>
 
This transformation lacks symmetry which makes it suspect. Currently there's nothing in the task description to help us understand this issue. It's difficult to see how this corresponds to a contour of the original image, but if the above were rotated counterclockwise 90 degrees, the inner region of zeros doesdo correspond to the original image:
 
<pre>0 0 1 1 0
Line 47 ⟶ 42:
0 0 0 1 1</pre>
 
Again, this lacks symmetry. This one, at least, seems to correspond more closelyroughly to the original shape and orientation (though the orientation is my doing, and the interior of the initialcountour bitmapdoes not correspond to the original shape).
 
Possibly all of these results are correct. Possibly not. Currently the task is too ambiguous. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 01:34, 30 June 2022 (UTC)
Line 54 ⟶ 49:
 
:Overall I would agree this task is far from perfect and TG's code is at best a gross oversimplification (whilst somehow also being a gross overcomplication) that bears little resemblance to anything else I've seen. Then again in my opinion the wp description of the algorithm also leaves much to be desired. It seems to me the Julia and Python outputs are rotated by 90 but with 99.9% of the actual implementation being somewhat hidden I can't exactly be sure about that. A much better (text-representable) input, the expected/desired output (ditto), and maybe a few simple (third-party-hosted) images would certainly help. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:43, 30 June 2022 (UTC)
:FWIW, I suspect the Wren and Phix output corresponds to the "gaps" in the input, and maybe the (quite blatently deliberate and easily undone) negative Y result is somehow supposed to indicate that? --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 20:43, 30 June 2022 (UTC)
 
::If I understand right, the result that we are expecting should correspond to positions half way between pixels. Looking at the wikipedia entry, we should be working with an intermediate result something like this:
<tt>
:: 0 &nbsp;0 &nbsp;0 &nbsp;0 &nbsp;0
:: 0 &nbsp;2 &nbsp;3 &nbsp;1 &nbsp;0
:: 0 &nbsp;6 15 &nbsp;9 &nbsp;0
:: 0 &nbsp;4 14 &nbsp;9 &nbsp;0
:: 0 &nbsp;0 &nbsp;4 &nbsp;8 &nbsp;0
:: 0 &nbsp;0 &nbsp;0 &nbsp;0 &nbsp;0
</tt>
::But then, according to the wikipedia page, each of those integer values get expanded into collections of pixels. And that's not what we are seeing here with any of the current task implementations. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 11:33, 1 July 2022 (UTC)
 
==Oval of Cassini==
 
It is always difficult when a task is submitted with no implementation and just a reference to Wikipedia, especially if the task's author does not then engage in the discussion. I suggest the task description should be expanded to in include an example, and that that example should be [https://en.wikipedia.org/wiki/Cassini_oval Oval of Cassini]. The task being to use Marching Squares to produce [https://en.wikipedia.org/wiki/File:Cassini-3kurv.svg Expected Output].--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:36, 1 July 2022 (UTC)
2,172

edits