teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
califax has quit [Remote host closed the connection]
califax has joined #openscad
ccox has joined #openscad
<gbruno> [github] kintel closed issue #5903 (Nightly build does not start (black window)) https://github.com/openscad/openscad/issues/5903
J25k13 has joined #openscad
J25k49 has quit [Ping timeout: 240 seconds]
_whitelogger has joined #openscad
Murr has quit [Ping timeout: 245 seconds]
mmu_man has quit [Ping timeout: 272 seconds]
<gbruno> [github] charlesmaher opened issue #5904 (View > Center keybind does not function on Windows) https://github.com/openscad/openscad/issues/5904
califax has quit [Quit: ZNC 1.8.2 - https://znc.in]
califax has joined #openscad
<JordanBrown> InPhase would complex number support really require more than defining a constant i? (or more likely I)
<JordanBrown> 27*I+13 doesn't seem like an awful style.
<JordanBrown> But then again I have never been enough of a mathematician to do anything useful with complex numbers, so what do I know?
<InPhase> JordanBrown: Well actually that's more likely to collide with existing code. If you include something that uses complex numbers, but you used a variable I in your code, you'd break the included code.
<InPhase> But supporting as 13+27i introduces no conflicts or ambiguities.
<InPhase> (Provided there is no support for number-starting variables.)
<InPhase> This is why every other language supporting this does it like 13+27i (math and physics convention) or 13+27j (engineering convention).
<InPhase> I think we should probably choose 13+27i, because then we leave open the logic of 5+4i+6j+7k as a modality for defining quaternion literals, if we support implicit casting from complex to quaternion in some way that doesn't break anything.
<InPhase> If we did 13+27*I though we'd need to deprecate and add warnings for lines like I = 5; J = 6; and K = 8;
<InPhase> And that sounds more extreme to me.
guso78k has joined #openscad
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 260 seconds]
<guso78k> what would be the direct advantage of having complex numbers in openscad.  just having is not yet satisfying
<guso78k> Ultimately "Value"  must  contain 2 values in instead of just a double
guso78k has quit [Quit: Client closed]
fling has joined #openscad
Yuzuruha has joined #openscad
drfff has quit [Read error: Connection reset by peer]
Yuzuruha has quit [Ping timeout: 268 seconds]
JakeSays_ is now known as JakeSays
howiemnt1 has joined #openscad
howiemnt has quit [Ping timeout: 276 seconds]
L29Ah has quit [Read error: Connection reset by peer]
JakeSays_ has joined #openscad
JakeSays has quit [Ping timeout: 245 seconds]
howiemnt1 has quit [Read error: Connection reset by peer]
howiemnt has joined #openscad
JakeSays_ is now known as JakeSays
nomike has quit [Ping timeout: 244 seconds]
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
L29Ah has joined #openscad
snaked has quit [Remote host closed the connection]
guso78k has joined #openscad
guso78k has quit [Quit: Client closed]
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
teepee has quit [Remote host closed the connection]
fling has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
fling has joined #openscad
califax has joined #openscad
teepee has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
aiyion2 has quit [Remote host closed the connection]
aiyion2 has joined #openscad
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
L29Ah has left #openscad [#openscad]
rawgreaze has quit [Ping timeout: 252 seconds]
<JordanBrown> The underlying implementation is straightforward enough, not a concern.
rawgreaze has joined #openscad
<JordanBrown> As to "why"... I don't know. Like I said, I'm not enough of a mathematician to have ever done anything useful with complex numbers.
<JordanBrown> Other people *have* done things they consider useful, but I have no idea whether those things would be relevant to 3D modeling.
<JordanBrown> OTOH, the quaternion stuff that InPhase is talking about sounds like it's at least sort of relevant.
<InPhase> guso78: Oh, I thought you dropped so I didn't answer. I guess you remain in a different form. Complex numbers are just a shortcut for doing some kinds of trig.
<InPhase> Real and imaginary are just bookkeeping for 2 coordinates, with ways to do 2D rotation and scaling by multiplication.
<InPhase> There is always another way to write out the equivalent with trig functions and/or matrices, and/or a vector of coordinate pairs.
<InPhase> But as I've been trained in thinking that way, there have been some times where I think about an operation with complex plane stuff, and then I implement it in a more expanded way in OpenSCAD.
<InPhase> So supporting it is just about giving that tooling for people who have learned how to do these operations as another thinking modality about working with 2D coordinates.
<JordanBrown> Seems like a bad shortcut. Multiplying a Y coordinate by a Y coordinate (if it's meaningful at all) does not seem like it would result in an X coordinate.
<JordanBrown> C++ lets you say 47i. In C, you have to say 47*I.
<InPhase> JordanBrown: Yeah, that's not the way to think about multiplication in that space. Magnitude is scaling, phase is rotation, so every complex number is a vector, and that vector's magnitude and angle reveals the scaling and rotation that it corresponds to.
<InPhase> JordanBrown: So addition is translation by a vector, and multiplication is scaling and rotation by a vector.
<JordanBrown> Without really thinking it through, yes, I understand that.
<InPhase> And one can quickly extract all the necessary values with complex exponentiation with e^z
<JordanBrown> But complex (0,1) * (0,1) is (1,0), which doesn't seem to align with the vector usage.
<InPhase> -1, because it rotates 1i by 90 degrees.
<JordanBrown> yes, sorry, typo, result is (-1,0).
<JordanBrown> But in vector-space, why does multiplying (0,1) by (0,1) yield (-1,0)? What do the two values *mean* that makes that make sense.
<JordanBrown> ?
<InPhase> Well you just are taking one, and rotating and scaling by the other.
<InPhase> Or the product of the two magnitudes, and the addition of the two phases.
<JordanBrown> What units are they in?
<InPhase> mm, the same as anything else.
<JordanBrown> What does it mean to rotate by a coordinate?
<InPhase> The two angles from positive x, or the (1,0) direction, are added together.
<JordanBrown> OK, starting to get it.
<JordanBrown> (thinking)
<JordanBrown> so when you multiply (x1,y1) by (x2,y2) you get (x1*x2+y1*y2, x1*y2+x2*y1), right?
<JordanBrown> Does that really result in the right angle? I'm not saying it doesn't, just that it isn't instantly obvious to me that it would.
nomike has joined #openscad
<JordanBrown> But also it seems like this totally falls apart when you want to move from 2D to 3D.
<InPhase> You'll want -y1*y2 there. But yeah, it's totally not obvious when looked at that way. It's obvious when looked at through the scaled Euler formula m*e^(i*phi) = m*cos(phi) + i*m*sin(phi) The right side is the 2D vector coordinates, and the left side more obviously obeys the specified properties under multiplication, as m1*e^(i*phi1) * m2*e^(i*phi2) = m1*m2*e^(i*(phi1+phi2))
<JordanBrown> ... eyes cross ...
<InPhase> Yeah. Complex only does 2D. Quaternions do 3D through 4D, and can be a bit more complicated. I frankly do not have a strong quaternion intuition built up, but I did find a good description that helps justify it through an analogy to bivectors that I found somewhat helpful. It has a nice clickbaity title: https://marctenbosch.com/quaternions/
<JordanBrown> yeah, sorry, I dropped the "i" factors from the y1*y2.
<JordanBrown> (For background, I did well in HS math through, but not including, calculus. Calculus was the first math class where I actually had to do the homework to learn the material, and I figured that out too late.)
<JordanBrown> So I know what integrals and derivatives and limits *are*, but am very weak on actually doing the math.
<JordanBrown> And anything beyond that, no.
<InPhase> Calc 2 was my first math class where I had to actually study material. It slapped me around for half a semester before I got my act in gear. It was my first undergrad semester, and required some updated mindsets from me. :)
<InPhase> My calc1 class experience is perhaps best exemplified by the time I had my head down and was TRYING to take a nap, when I hear another student complain, "How come HE gets to sleep?" after the teacher insisted he pay attention. I popped my head up, the calc teacher turned to me and pointed to the board and said, "What's the answer to this?" for the problem he was about to explain how to do. I answered
<InPhase> it. He said, "Okay, you can put your head down."
<JordanBrown> I went straight from HS to a programming job; I never went to college. That was easier 40 years ago when there weren't very many programmers.
<JordanBrown> :-)
<InPhase> So I had yet to learn studiousness. lol
<JordanBrown> Yeah, I never really learned that.
<JordanBrown> Most stuff came easily and naturally.
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
<JordanBrown> I was quite concerned when I starting working on programs that were so large that I couldn't keep the entire thing in my head; I wasn't sure that I could figure out how to scale past that limit.
<InPhase> Yeah. First semester of undergrad I learned the hard way to stop relying on that. I did better then. It was just a delayed lesson. I think that would have gone easier had I been challenged to the point of failure at some prior time. Everyone needs some of that.
<JordanBrown> Yes.
<JordanBrown> I still don't know how to study, per se. But I'm really good at modularity and interfaces, so I can compartmentalize stuff and treat it as a black box until I need to look inside.
<JordanBrown> Anyhow, going back to complex arithmetic, if it happens that complex arithmetic and 2D vector arithmetic are the same, in a meaningful way, then I withdraw my objection to the shortcut.
<JordanBrown> Except that until you extend complex arithmetic to more than two dimensions (which sounds like what quaternions do), it seems too limited to be useful.
<InPhase> It has two utilities. One is analogous to working with polygons and extruding.
<InPhase> The other is sometimes for stuff that should be oscillating.
<InPhase> Like you can also potentially work with wavy features this way.
<JordanBrown> For your first point, you mean that 2D is an interesting enough subset on its own that it's OK to have 2D-specific stuff?
<JordanBrown> For your second point (oscillating), that only applies if they are oscillating in two dimensions, not three, right?
<InPhase> Yeah, that 2D is interesting enough on its own.
<JordanBrown> Somewhat unsatisfying, but OK.
<InPhase> And for oscillating, I mean like wavy vase shapes and such.
<JordanBrown> I was thinking of oscillation in the sense of a point moving along a closed path.
<InPhase> That'd be for the 2D contour case.
<JordanBrown> where having that path lie in a plane is a large and useful subset, but in general it can be 3D.
<JordanBrown> "If a vector is like a line, then a bivector is like a plane..."
<JordanBrown> But a vector is a line *segment*.
<JordanBrown> (rooted at the origin)
<JordanBrown> Not disagreeing with the overall point, just quibbling about terminology.
<InPhase> Yeah, a little loose there on the labels. But he has nice animations to fix it. :)
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad
<JordanBrown> Finished reading. Can't say that I truly followed it, but I got a lot of it.
<InPhase> I had to read it a couple times. Not sure I fully internalized it yet. But I recognize the strength of the viewpoint.
<InPhase> But hey, really clicking on complex numbers took me, what I guess can be most fairly listed as years.
<InPhase> So I'll call it sensible that these topics are complicated to understand intuitively.
<JordanBrown> Yeah, I only understand complex numbers from what might be viewed as a simple algebraic perspective, where i is sqrt(-1) and the arithmetic flows from that. But what they are *useful* for, no idea.
<InPhase> Yeah. Ironically that's almost the most meaningless thing about them. But it's always what's taught first.
InPhase has quit [Ping timeout: 248 seconds]
InPhase has joined #openscad
nihil has quit [Ping timeout: 248 seconds]
nihil has joined #openscad
nihil has quit [Changing host]
nihil has joined #openscad
mmu_man has joined #openscad
<InPhase> Square rooting is just halving the phase. A special case of the multiplication principle. The square root of 1 is also including -1 by this same logic. The 4th root of -4 is also 1+1i. It all flows from a deeper principle.
<InPhase> The ith root of -1 is also the real number 23.14..., which sounds insane, unless the Euler formula becomes the base of intuition, and then it's clear that it must be e^pi.
Guest35 has joined #openscad
Guest35 has quit [Client Quit]
<JordanBrown> My brain has exploded.
<JordanBrown> Now I have to clean all of this brain goop off of my monitors and out of my keyboard. Thanks.
<JordanBrown> (Seriously, thanks for the help.)
<InPhase> Hahah.
Murr has joined #openscad
Murr has quit [Changing host]
Murr has joined #openscad
Scopeuk has quit [Quit: Quit]
Scopeuk has joined #openscad
L29Ah has joined #openscad
<gbruno> [github] nomike opened issue #5905 (Wrong comment type when editing python files) https://github.com/openscad/openscad/issues/5905
stealth_ has joined #openscad
<gbruno> [github] nomike opened issue #5906 (OpenSCAD segfaults when using `difference()` in python) https://github.com/openscad/openscad/issues/5906
<gbruno> [github] nomike opened issue #5907 (In python mode the preview is rendered on every key event) https://github.com/openscad/openscad/issues/5907
<gbruno> [github] nomike edited issue #5907 (In python mode the preview is rendered on every key event) https://github.com/openscad/openscad/issues/5907
<gbruno> [github] nomike opened issue #5908 (QObject::startTimer: Timers can only be used with threads started with QThread) https://github.com/openscad/openscad/issues/5908
<gbruno> [github] nomike opened issue #5909 (OpenSCAD reports "Python is not enabled" when run with "-o" on a python file) https://github.com/openscad/openscad/issues/5909
<nomike> I almost feel the need to apologize for finding so many bugs at once... ^_^
<teepee> the last one does not sound like a bug
<teepee> enabling features on command line is --enable python-engine
<gbruno> [github] nomike opened issue #5910 (Python submenu in main-menu is present even when `-DENABLE_PYTHON=OFF`) https://github.com/openscad/openscad/issues/5910
<teepee> also I don't think anybody will look at python issues,
<teepee> well, we'll see
<stealth_> I find python is much easier to code/maintain, basic features work so already have success in prototyping.
<gbruno> [github] nomike closed issue #5909 (OpenSCAD reports "Python is not enabled" when run with "-o" on a python file) https://github.com/openscad/openscad/issues/5909
_whitelogger has joined #openscad
snaked has joined #openscad
stealth_ has quit [Quit: Leaving]
stealth_ has joined #openscad
<gbruno> [github] gsohler opened pull request #5911 (Update MainWindow.cc) https://github.com/openscad/openscad/pull/5911
<gbruno> [github] gsohler pushed 1 modifications (Update MainWindow.cc Effectively disable Python menu) https://github.com/openscad/openscad/commit/b6a0e758e29e00323b8a5752ad3d30c46f6dd40b
stealth_ has quit [Quit: Leaving]
stealth_ has joined #openscad
<stealth_> teepee, fyi, remember how i was monkey-patching "libOSMesa.so.8", think the proper solution is to install "mesa-amber" https://docs.mesa3d.org/amber.html
<stealth_> another issues with "libgallium-25.1.0-cachyos1.3.so" started today, so installing mesa-amber fixed both issues (so far)
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
<gbruno> [github] t-paul closed pull request #5911 (Update MainWindow.cc) https://github.com/openscad/openscad/pull/5911
<gbruno> [github] t-paul pushed 1 modifications (Merge pull request #5911 from openscad/gsohler-patch-5 Update MainWindow.cc) https://github.com/openscad/openscad/commit/c76900f9a62fcb98c503dcc5ccce380db8ac564b
<gbruno> [github] t-paul closed issue #5910 (Python submenu in main-menu is present even when `-DENABLE_PYTHON=OFF`) https://github.com/openscad/openscad/issues/5910
J25k13 has quit [Quit: Client closed]
J25k13 has joined #openscad