Star Trek: The Doomsday Machine

Just as an aside - one of the Next Gen novels (Vendetta ) gets into the origins of the Doomsday Machine. Pretty good book.

Hard sci fi my a–.
It isn’t a carrot, it’s an ice cream cone.
Hence the change in size as it melts.