yunwal 1 day ago

> First, we model the onion as half of a disc of radius one, with its center at the origin and existing entirely in the first two quadrants in a rectangular (Cartesian) coordinate system.

Can someone explain to me why a half sphere (the shape of half an onion) can be modeled as a half-disk in this problem? Why would we expect the solutions to be the same? If you think about the outermost cross-sections at the ends of the onion (closest to the heel and tip of the knife), as you get closer and closer to the ends, you approach cutting these cross-sections more vertically. I'd expect that you'd have to make the center cross-section a bit shallower to "make up" for the fact that the outsides are being cut vertically. Idk, either way I think declaring this the true "Onion constant" is probably wrong.

5
gus_massa 1 day ago

The solution is later in the article.

> The insight that leads to a solution comes from the Jacobian.

It's not a unform half disk. It has more weight away from the Y axis.

You can imagine it's painted with watercolors and you want to collect the same ammount of ink.

In an uniform disk you have

    xx
   xxxx
   xxxx
  xxxxxx
  xxxxxx
  xxxxxx
But in the weighted disk of the article the top and bottom are darker and the center lighter

    ..
   x..x
   x..x
   x..x
  Xx..xX
  Xx..xX
  Xx..xX
but there are no strips like in my ASCII art, the shade changes slowly.

Maken 1 day ago

He's also ignoring that the layers of the onion become significantly thinner the farther away from the center they are. So this analysis is way off even for a perfectly symmetrical onion.

dole 1 day ago

Even though onions aren't perfectly symmetrical, they still optimally grow or radiate out from one axis/line through the middle. Stick a toothpick through a sphere as this line, and slice the sphere through perpendicular to the axis, you'll get circles from a sphere, or half-disks from a half onion if you keep slicing perpendicular.

I'm lazy and cut my onions perpendicularly through halves, and don't try a radial cut for uniformity.

yunwal 1 day ago

> Even though onions aren't perfectly symmetrical

The question I have is not about modeling an imperfect object as a perfect abstraction, it's about modeling a 3D object as a 2d object, and assuming that the optimization still holds. I think it's pretty plainly clear that it doesn't. Think about some cross-section of the onion that's closer to you and smaller than the center cross-section. Let's say it's of radius 0.25 instead of 1. The slices you take of it will be much more vertical than the center slice. This changes things. My intuition tells me it means the optimal solution is shallower than the solution found here, since you'd want the "average" cross-section to follow this constant.

sgc 1 day ago

The author dealt with this outside the article, and posted a link to his slides in this HN post. The relevant slides begin at [1].

At the end of the day a straight cut is limiting. The next step would be to design the perfect onion dicing knife.

[1] https://drspoulsen.github.io/Onion_Marp/index.html#44

thaumasiotes 1 day ago

Those slides show that the solution won't work on actual onions. Call the innermost layer of the onion its "biological center", and call the center of the spheroid approximately occupied by the onion its "geometrical center".

As is beautifully illustrated on slide 50, the biological center is generally not particularly close to the geometrical center, and this introduces huge distortions in slices that cut close to the biological center.* A single layer of the onion can run parallel to the knife cut for quite some distance.

* The slides also observe that in reality, before chopping an onion, you cut off the top and bottom. This same phenomenon explains why you have to do that; a vertical cut through the top or bottom end of the onion would just give you one huge piece. (You also need to get rid of the roots on the bottom and the sprouts on the top, but even if you didn't, you'd have to cut off the top and the bottom because they curve the wrong way.)

sgc 1 day ago

As you point out, without a perfectly symmetrical onion of course this will not work very well. You would need to use a moving geometrical center point when slicing for best results.

Further, as noted elsewhere the outer layers are thicker in a real onion, so we need to reformulate to take this into account.

The other obvious simple improvement I can think of would be to use radial cuts in both directions. Each direction with the its own optimized floating center point of course. Reformulations would need to take this into account - although the end result would be quite close, and likely well within the margin of error for almost any human being aiming at an imagined floating center point below a cutting board :).

StrangeDoctor 1 day ago

Haven’t had enough coffee to think about this rigorously.

My intuition says that as long as you could get to the desired 3D shape from revolving the 2D shape around an axis, essentially integrating the area into a volume, the results will be valid or equivalent.

I don’t think that’s the entire story, there are probably other ways to simplify 3D shapes. And yes, onions will have non constant variations (or ones that don’t cancel out to 0) along the sweep which is what actually invalidates the real world application.

jameshart 1 day ago

If you model the (half) onion as a stack of these slices, it’s clear that the radius of each slice varies over the height of the onion; so the points below the onion found by this method towards which you need cut will form a curve, not a straight line. That is hard to accomplish with a straight knife that makes planar cuts.

dylan604 1 day ago

Isn't that where calculus and intergrals come into to play? As the radius approaches infinity type of stuff?

ktallett 1 day ago

Pretty much, and if you take smaller segments, you get a more accurate answer. Exactly the same as cutting an onion, if you cut it into quarters, then seperate layer by layer and chop each individually, you get a finer result.

stonemetal12 1 day ago

I believe you are supposed to calculate R*0.55... once for the max onion radius and use the same cut on the smaller disks. That way the smaller disk is cut identically to the inner part of the larger disk.

yunwal 1 day ago

The same cut (in terms of angle) on smaller disks would be impossible with a real knife. You'd have to bend the knife in order to achieve it.

PittleyDunkin 1 day ago

Only some types, of course. Shallots are not spherical, though they are radial, but the centerline is often curved.

account42 1 day ago

Shallots very often have two bulbs fused together which makes them very much non-radial.

PittleyDunkin 1 day ago

I was referring to the fact that each bulb tends to expand outward in layers from a core. You are, however, correct.

dhosek 1 day ago

For a moment, I thought that “the onion problem” related to some challenging issue of topology or group theory, before my brain finally sorted through its connections to identify Kenji Lopez-Alt as a chef and not a mathematician.

glompers 1 day ago

J. Kenji Lopez-Alt _was_ actually mentioned (featured?) in alt-weekly The Onion this month. The problem, though, was that it was in an un-funny piece about the beef dimension, and it is not worth footnoting here. I guess they should have researched this 2021 article and spun off of it instead. But maybe a Quanta Magazine and infowars joint venture could enter the beef dimension. An onion with too many alt-layers.

bigstrat2003 1 day ago

I thought it was funny. Probably the first funny thing I've seen from the Onion in years, actually.

giraffe_lady 1 day ago

He's not a chef either he's a food writer and recipe tester. I don't mean this as disrespect at all just they are very different professions, using different skills and producing different outputs.

grgbrn 1 day ago

Before he was a food writer he worked in a number of fairly high-end restaurants in Boston (which he talks about occasionally on his Youtube channel), and then he opened his own restaurant in 2017ish. Not sure how that's "not a chef"

giraffe_lady 1 day ago

I simply didn't realize he had ever run a restaurant.

bigstrat2003 21 hours ago

I feel like you have an overly restrictive definition of "chef". Owning a restaurant doesn't make you a chef, cooking food professionally does. Even if he never set foot in a restaurant kitchen, the man cooks food all day long for his job. That makes him a chef.

giraffe_lady 20 hours ago

I have a chef's definition of a chef. You're welcome to use whatever one you prefer though.

dekhn 1 day ago

he was also a biochem phd candidate.

Cerium 1 day ago

I share simular concern, but also think of an onion more as a bulging cylinder due to center weighted thickness variation in layers. Each layer extends from root to stalk.