Valentine's Day
Goto page 1, 2  Next
 
Post new topic   Reply to topic    K3DSurf forum Forum Index -> Mathematical Models Collection
View previous topic :: View next topic  
Author Message
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Fri Feb 11, 2011 5:57 am    Post subject: Valentine's Day Reply with quote

Well I hate this holiday too Smile
Heart 1 (as mentioned before) is pretty good:
Code:
F(x,y,z,t) = (x*x+9/4*y*y+z*z-1)^3 - (x*x+9/80*y*y)*z^3 = 0
 x [ -1.3, 1.3]
 y [ -0.7, 0.7]
 z [ -1.0, 1.3]

However I find it much too fat, so I made my own:

Code:
F(x,y,z,t) = (x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z=0
 x [ -1, 1]
 y [ -0.7, 1.1]
 z [ -0.3, 0.3]


Now, how about some tweaking? Maybe decorative effects on the surface? Share your thoughts.
Back to top View user's profile Send private message Visit poster's website
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Fri Feb 11, 2011 10:07 am    Post subject: Reply with quote

Ok I made some major tweaking:

Code:
F(x,y,z,t)=1/(1+(10+50*abs(x))*((x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z)^2)-(0.5-0.5/(1+4000*x^4+4000*z^4))*(sin(5.5+24*y+12*atan(x/z)))-1.1+0.5/(1+4000*x^4+4000*z^4)=0

 x [ -1.1, 1.1]
 y [ -0.8, 1.2]
 z [ -0.4, 0.4]

12 strands. If you want an odd number, you have to use atan2.
Back to top View user's profile Send private message Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Fri Feb 11, 2011 7:37 pm    Post subject: Reply with quote

Hi,
That's a wonderful tweaking Shocked . I'm wondering if that kind of tweaking can be used for every kind of mathematical shape Razz
Oh...I almost forget to say : happy valentine day to everyone Wink
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Fri Feb 11, 2011 11:34 pm    Post subject: Reply with quote

Absolutely! However I used some correcting functions to modify it to a more suitable shape. That's why the equation is so awful Smile
Back to top View user's profile Send private message Visit poster's website
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Sat Feb 12, 2011 8:53 am    Post subject: Reply with quote

Here comes another one:
Code:
F(x,y,z,t)=1/(1+(5+50*abs(x))*((x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z)^2)=1.15+(0.25-0.25/(1+4000*x^4+4000*z^4))*(cos(32*atan((x^2+abs(x))/z/2))+cos(32*y+16*atan((x^2+abs(x))/z/2))+cos(32*y-16*atan((x^2+abs(x))/z/2)))-0.3/(1+4000*x^4+4000*z^4)

x [ -1.1, 1.1]
y [ -0.8, 1.2]
z [ -0.4, 0.4]



Back to top View user's profile Send private message Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Wed Feb 16, 2011 9:22 am    Post subject: Reply with quote

Hi,
That's great to see this kind of tweaking used for an isosurface. it's easier with the parametric surfaces since the tweaking can "follow" a well defined direction due to the (u,v) parameters. Abdelhamid Belaid is trying to do something similar but without using any correcting functions. Jotero have also made some funny objects by using the famous topological modeller Topmod. So there is many ways to Rome and each one is trying to pursue his own instinct. That's what make math so funny Razz
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
abdelhamid belaid



Joined: 13 Aug 2009
Posts: 170

PostPosted: Thu Feb 17, 2011 10:27 pm    Post subject: Reply with quote

Hi,
Really great Furan Razz, Is there a general way to do such a kind of tweaking ? ( general equation for example ) ?.

I could not resist :



Code:
F(): ((x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z -0.5)^2+
( cos(16*atan2(y,x))+cos(12*sqrt(x^2+y^2))  )^2/4 -0.04
[x]: -1.5 , 1.5
[y]: -1 , 1.4
[z]: -1 , 1
CND : x^2+y^2>0.05


Please what does it mean ( correcting functions ) ? ,all thanks.
_________________
My YouTube channel


Last edited by abdelhamid belaid on Tue Mar 29, 2011 3:56 am; edited 2 times in total
Back to top View user's profile Send private message Send e-mail Visit poster's website
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Fri Feb 18, 2011 1:51 pm    Post subject: Reply with quote

Great job Very Happy I see you've clipped off the "ugly" part. Damn singularities Smile I used "correcting functions" to smooth them.

For general purposes I often use a function similar in shape to Gaussian normal distribution:
Code:
y=1/(1+a*x^n)
x=(-inf;+inf)
y=(0;1>

The bigger the "n" is, the bigger the "a" also has to be (I will point it out later)
The bigger the "a", the more narrow the "blob" is.


Let's take a look at the left side of the last one:
Code:
F(x,y,z,t)=1/(1+(5+50*abs(x))*((x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z)^2)

This is in fact: 1/(1+a*x*x) where "x" is the original heart3 isosurface and "a" is a correcting function. The bigger the "a" value is, the steeper the blob is. I used (5+50*abs(x)) because the heart surface thickness (we're not there yet) is bigger at the sides (larger x) of the heart.
Because the blob goes (0;1>, we put it equal to 0.5 and now the heart will have thickness that is equal to the middle width of the blob. Well not exactly, it depends on the local derivative but it would be exact on a sphere isosurface.
Now if we vary on the 0.5 value (lets call it "h"), we get different thickness, for value h > 1 we won't get anything at all.

Ok, lets look at the right half, this is where all the magic happen Smile

The grid is made by a triple sinusoidal surface for the value h.

Main offset to make the grid pattern:
Code:
1.15+


The following function reduces the amplitude of the sinusoidal h surface along the z axis to smooth out the ugly part.
Code:
+(0.25-0.25/(1+4000*x^4+4000*z^4))*


This is the sinusoidal surface with waves in three different directions (hexagonal pattern)
Code:
*(cos(32*atan((x^2+abs(x))/z/2))+cos(32*y+16*atan((x^2+abs(x))/z/2))+cos(32*y-16*atan((x^2+abs(x))/z/2)))-


And this function reduces the h offset at the z axis. If you remove this, there will be a hole along the z axis. I used n=4 for a very "local" patch with sharp edges. n=4 requires high "a" -> 4000. Just put a high "n" function in a graph generator and you will understand what I mean.
Code:
-0.3/(1+4000*x^4+4000*z^4)


So that's it. The grid is made by holes (h>1) in triangular pattern. If you want to understand it, just change some of the parameters. It's really fun. Go nuts !!!
Back to top View user's profile Send private message Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Fri Feb 18, 2011 8:33 pm    Post subject: Reply with quote

Hi,
Thanks for the explanation. It's fascinating to see the link between the two tweaking of the heart surface (strands and blobs) and how they relate to the same idea Smile . good job !
PS: to work properly with K3DSurf, the bloby heart formula should be :
Quote:
Name: HeartBlob
F(): 1/(1+(5+50*abs(x))*((x*x-2*abs(x)+1.5*y)^2-1+x*x+10*((1-y)^4+1)*z*z)^2)-(1.15+(0.25-0.25/(1+4000*x^4+4000*z^4))*(cos(32*atan((x^2+abs(x))/z/2))+cos(32*y+16*atan((x^2+abs(x))/z/2))+cos(32*y-16*atan((x^2+abs(x))/z/2)))-0.3/(1+4000*x^4+4000*z^4) )
[x]: -1.1 , 1.1
[y]: -0.8 , 1.2
[z]: -0.4 , 0.4
;

_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
abdelhamid belaid



Joined: 13 Aug 2009
Posts: 170

PostPosted: Sun Feb 20, 2011 10:34 pm    Post subject: Reply with quote

Thanks furan for this explanation Smile,
In fact you put your hand exactly above the hurt, for me making patterns over arbitrary surface is still yet a problem even over simple surfaces like z=x*y or z=x^2, a long time had passed and me trying to solve it and get an explicit expression F(x,y,z)=0 (or parametric expressions).

"For me" there are many questions still posing themselves, for example :

What about the design of holes I want? (the decoration I want to get).
What about the section of tiny rods upon sides (so to speak)? How can I get the section I want (circle, square, flower, curve of a function y=f(x) ....)?.
What about the angle between this section and the tangent plan of our surface in each point? for me I think it would be better if it equals pi/2.

All that and the important thing is getting dimensions, we should have three dimensions to write the formula of form we are imagining , these three are two by two orthogonal, one of them is orthogonal with our surface (Let’s call it N) and the other two are tangents (T1 and T2 ) ( as you know there is only one orthogonal in each point and there are infinity number of tangents ) then we can write F(N,T1,T2)=0 as we like.

If I had this parametric surface x=f(u,v), y=g(u,v) and z=h(u,v), N is defined by :



for example with z=x^2 , here N is :




for z=x*y :




It remains to get just the two appropriate others T1 and T2 to write F(N,T1,T2)=0 (It’s a family of forms).

Getting dimensions :
In the general case that's possible if we could to solve equations systems as you saw above, or to take a bit twisted other ways, if we could get one equation of one form from this family may be we'll can get something, for example you remember we've seen the general equation of helices f( rho-a ,h)=0, in the beginning I wasn't know “h” but when I got the formula of the normal helix (rho-a)^2+h^2-R^2=0 I deduced h then, and used it in many other writings to create other patterned helices.

For exemple this is my last work where I had got three dimensions :

_________________
My YouTube channel


Last edited by abdelhamid belaid on Mon Nov 07, 2011 1:18 pm; edited 4 times in total
Back to top View user's profile Send private message Send e-mail Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Mon Feb 21, 2011 9:11 am    Post subject: Reply with quote

Hi,
Quote:
What about the design of holes I want? (the decoration I want to get).
What about the section form of the tiny rods upon sides (so to speak)? How can I get the section I want (circle, square, flower, curve of a function y=f(x) ....)?

You're right Abdelmajid, it's somehow very difficult to address all these questions the way Furan did... Not only the Distributions of the patterns over the final surface but also there geometry must be defined.
The "Distrubution" problem depends also on the shape, size (and number) of the decorative pattern: I understand that when looking on my mother making cakes with different sizes and shapes from the same flattened pastry Smile
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
abdelhamid belaid



Joined: 13 Aug 2009
Posts: 170

PostPosted: Mon Feb 21, 2011 11:02 am    Post subject: Reply with quote

Yes Taha it's very suitable example Very Happy
These anyway are just my own questions and my own problems, I had solved it only for some basic forms like cylinder, torus, helix/torus ... where dimensions are very clear.

For geometry of initial surface and Distributions of patterns over the final surface I think we can get so if we were properly choosing T1 and T2, It's too remains a problem.
_________________
My YouTube channel
Back to top View user's profile Send private message Send e-mail Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Mon Feb 21, 2011 8:24 pm    Post subject: Reply with quote

Hi,
Quote:
Yes Taha it's very suitable example Very Happy
These anyway are just my own questions and my own problems, I had solved it only for some basic forms like cylinder, torus, helix/torus ... where dimensions are very clear.

Just to say that my mother before flattening the pasrty,she always make it first as a sphere or a cylinder. What I mean is that topologicly speaking, a sphere is equivalent to a Heart but not the torus because of it's "hole" and thus we can easily make a lot of shapes (includind a cylinder and a heart) from a sphere by using some elementary operations. Some of theme are used in K3DSurf in the "Tools" tab ( "twist" and "scale"). So this might be the easiest way to do it: make a sphere (or another basic form) with some cool paterns well distributed on it's surface, then turn it to a heart by using some mathematical deformers (some example are available in K3DSurf).
What you think, isn't doing math like making cakes ? Very Happy
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
abdelhamid belaid



Joined: 13 Aug 2009
Posts: 170

PostPosted: Tue Feb 22, 2011 3:00 pm    Post subject: Reply with quote

Quote:
What you think, isn't doing math like making cakes ?

You're right Taha Smile, but there are others cases we need purely mathematical ways what I say or we're obliged to choose that sometimes or perhaps for gain time too, this latter for more complexity are often not easy only if we had a specific and appropriate equipments (or tools), but althought, also we shouldn't forget: each person has his own desires, for me for example I'm intrested in particular in formula not just creating form more of that it's well to be itself the norm dimension N from the beginning to avoid that problem because I always want to do new tweaking over my new surfaces also egain and again ... (this is possible, I did it in many works), well I'm too not always following up the purely mathematical way but often take others ways Confused.

For example this sphere :


Code:
  F(x,y,z) = sqrt(( 8*sin(28*min(max( abs(atan2(z,abs(x))) ,abs(atan2(y,abs(x))) )-pi/4   ,abs(abs(atan2(z,abs(y)))-pi/4)  ))/28 )^2
+(sqrt(x^2+y^2+z^2)-8 )^2) -0.15

N here is:
Code:
  N= sqrt(x^2+y^2+z^2)-8
and
Code:
  T1= ( 8*sin(28*min(max( abs(atan2(z,abs(x))) ,abs(atan2(y,abs(x))) )-pi/4   ,abs(abs(atan2(z,abs(y)))-pi/4)  ))/28 )
here the left side is too a norm dimention:
Code:
  N'= sqrt(( 8*sin(28*min(max( abs(atan2(z,abs(x))) ,abs(atan2(y,abs(x))) )-pi/4   ,abs(abs(atan2(z,abs(y)))-pi/4)  ))/28 )^2
+(sqrt(x^2+y^2+z^2)-8 )^2)


In occasion, Spheres are like a little stone in choes Shocked, I could just get a sphere with 6 poles over its side (Distribution), how nice we can get n properly distributed poles :






( It's very clear you like eat cakes Taha Very Happy and you're aware much details about Very Happy, anyhow I promis you one by K3DSurf Shocked ).
_________________
My YouTube channel


Last edited by abdelhamid belaid on Sat Apr 02, 2011 7:36 pm; edited 3 times in total
Back to top View user's profile Send private message Send e-mail Visit poster's website
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 538

PostPosted: Wed Feb 23, 2011 9:42 am    Post subject: Reply with quote

Hi Abdelmajid,
Your spheres are really awesome... Shocked and your approach is great so the only thing I have to say is: Keep it up.
Quote:
( It's very clear you like eat cakes Taha Very Happy and you're aware much details about Very Happy, anyhow I promis you one by K3DSurf Shocked ).

Oh yes, I like cakes and thank you in advance for making a mathematical one Very Happy
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    K3DSurf forum Forum Index -> Mathematical Models Collection All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


2005 Powered by phpBB © 2001, 2005 phpBB Group


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com