From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: calculating the volume of a given shape
Date: Tue, 28 Apr 2009 00:42:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <gt5jcp$rhg$>
References: <gs4q8u$kg1$> <gs6hop$mfh$> <gsh9qi$lmh$> <gshqgt$clk$> <gsictn$flu$> <gsjsju$fcg$> <gsl6vg$hjo$> <gslgfa$hrf$> <gsnf3n$fmv$> <gsnvbi$jl$> <gspe3a$3dg$> <gsskmd$ghg$> <gt4e4a$3vo$> <gt51n3$3cc$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1240879321 28208 (28 Apr 2009 00:42:01 GMT)
NNTP-Posting-Date: Tue, 28 Apr 2009 00:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:535819

"Roger Stafford" <> wrote in message <gt51n3$3cc$>...
> "David Edson" <> wrote in message <gt4e4a$3vo$>...
> > I want your idea again. I want to have my geometry zero y values at t values where abs(sin(k1t)) equals one. how could I approach it?
>   I'm afraid I don't understand your question, David. ......

  Your mention of the term abs(sin(k1t)) has triggered an important thought, David.  I should have thought of it before this.  Presumably this is a term you wish to add to the y coordinate of your surface.  I make the claim that this addition will have no effect whatsoever on the total volume enclosed by the surface, nor will it have a bearing on the question of whether the surface will intersect itself or not.  Also the same holds for the additive term abs(sin(k1*b)).  (Of course either of these would have a profound effect on the shape itself.)

  See if you agree with my reasoning.  In the case of abs(sin(k1t)), for any given beta its value will be the same at one value of t = theta as at its negative.  Moreover the values of x and z are the same for the two opposite-signed values of theta since cos(theta) is the same in both cases.  What this means is that y is being moved upwards by the same amount at the two ends of a rod extending through the volume parallel to the y-axis.  Since the volume can be considered as the double integral over the x-z plane of the length of that rod throughout the volume region, simply moving the whole rod farther up by variable amounts without changing its length will not affect the total volume occupied.  The same would be all the more true for the additive term abs(sin(k1*b)) since for any given b = beta, it is a fixed value unchanging with theta.

  In looking for surface intersections, as I have stated, you consider the y value plotting against the value cos(theta) for any fixed beta and look for cases of the curve crossing itself.  That would occur with two different values of theta with the same y and the same cos(theta)  These thetas can only be negatives of one another.  With each of the two above additions, abs(sin(k1t)) and abs(sin(k1*b)), the curve will therefore have such intersections at points where both ends of the "rod" above (zero length in this case) are moved upwards by the same amount.  Hence they will still intersect in the same way.

  I recall you mentioning that the volume calculation was independent of k1.  This is the explanation for that phenomenon!  It is also independent of the two entire additive terms.  Put them both in, multiply them by any desired constant factor, and they will make no difference to either the volume or the property of self intersection.

  This fact should greatly simplify any study of such intersections for the added term abs(sin(k1*b)).  It should also make it again possible to find volumes using the analytic solution for the volume with the methods I mentioned early on in this thread and not require the use of numerical integration with either 'dblquad' or 'quad2d'.  You are back to the equivalent (in the volume sense) equations:


which have an exact analytic expression for their volume.

Roger Stafford