Path: news.mathworks.com!not-for-mail 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$1@fred.mathworks.com> References: <gs4q8u$kg1$1@fred.mathworks.com> <gs6hop$mfh$1@fred.mathworks.com> <gsh9qi$lmh$1@fred.mathworks.com> <gshqgt$clk$1@fred.mathworks.com> <gsictn$flu$1@fred.mathworks.com> <gsjsju$fcg$1@fred.mathworks.com> <gsl6vg$hjo$1@fred.mathworks.com> <gslgfa$hrf$1@fred.mathworks.com> <gsnf3n$fmv$1@fred.mathworks.com> <gsnvbi$jl$1@fred.mathworks.com> <gspe3a$3dg$1@fred.mathworks.com> <gsskmd$ghg$1@fred.mathworks.com> <gt4e4a$3vo$1@fred.mathworks.com> <gt51n3$3cc$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1240879321 28208 172.30.248.35 (28 Apr 2009 00:42:01 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Tue, 28 Apr 2009 00:42:01 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:535819 "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gt51n3$3cc$1@fred.mathworks.com>... > "David Edson" <tojadeb@example.com> wrote in message <gt4e4a$3vo$1@fred.mathworks.com>... > > 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: x=rx.*cos(theta).*cos(beta); y=ry.*sin(theta)+2.^(k2*t)-2.^(k3*t)); z=rz.*cos(theta).*sin(beta); which have an exact analytic expression for their volume. Roger Stafford