View previous topic :: View next topic |
Author |
Message |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Thu May 02, 2013 11:10 am Post subject: |
|
|
thank very much
for the cube that work, if you write
min(min(1-abs(x) ,1-abs(y)),1-abs(z) )
or ( if you write min(min(abs(1-x),abs(1-y)),abs(1-z)) that work also, but
just for x=y=z=- +1 )
not if you write
min(1-abs(x) ,1-abs(y) ,1-abs(z) ) !
a detail
for the suite i am begin to calculate the 6xn of dodecaedron
i supposed if
f1=
if X= ( 2, 2, 2)* (x ,y , z )
f1= R - abs(2x+2y+2z) ?
cheers
denis |
|
Back to top |
|
 |
inode

Joined: 27 Jan 2007 Posts: 127 Location: Austria
|
Posted: Thu May 02, 2013 1:08 pm Post subject: Dodecahedron Variant (see link) |
|
|
Hi all
There is a nice wine red Dodecahedron Variant with one hole through any side puplished by Stefan at http://forum.jotero.com/viewtopic.php?t=258&postdays=0&postorder=asc&start=0 (03.06.2010, 12:34).
Stefan created this shape with 'Shade'. Now it would be nice to create a algebraic surface formula for that shape! One idee to get a formula may be to combine 6 rotated hyperbolic cylinders with the rules of an dodecahedron...
Gerd |
|
Back to top |
|
 |
Furan
Joined: 05 Oct 2010 Posts: 64 Location: Prague, Czech Republic
|
Posted: Thu May 02, 2013 1:20 pm Post subject: |
|
|
Yes, that is the scalar product of two vectors
f= R - abs(X * n) = R - abs(x*nx + y*ny + z*nz) |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Thu May 02, 2013 6:43 pm Post subject: |
|
|
hello all
here the detail for all n, for dodecaedron
it's if i make some mistake?
centre
he pink vertex at [f,0,-1/f]
The orange vertices at [1,1,-1] and [1,-1,-1]
The green vertices at [0,1/f,-f] and [0,-1/f,-f]
n1 = 1/5 * [2+f, 0, -1/f-2-2*f] / R
droit
The orange vertices at [1,1,-1] and [1,1,1]
The pink vertex at [f,0,-1/f] and [f,0,1/f]
The blue vertex at [1/f,f,0]
n2 = 1/5 * [2+2*f+1/f, 2+f, -0] / R
n2 = 1/5 * [2+2*f+1/f, 2+f, -0] / (sqrt(5/2+11/10*sqrt(5)))/2
gauche
The orange vertices at [-1,1,-1] and [-1,-1,-1]
The pink vertex at [-f,0,-1/f]
The green vertices at [0,1/f,-f] and [0,-1/f,-f]
n3 = 1/5 * [-2-f, 0, -1/f-2-2*f] / R
n3 = 1/5 * [-2-f, 0, -1/f-2-2*f] / (sqrt(5/2+11/10*sqrt(5)))/2
dessus
The orange vertices at [1,1,-1] and [-1,1,-1]
The blue vertex at [1/f,f,0] and [-1/f,f,0]
The green vertices at [0,1/f,-f]
n4 = 1/5 * [0, 1/f+2+2*f, -2-f] / R
n4 = 1/5 * [0, 1/f+2+2*f, -2-f] / (sqrt(5/2+11/10*sqrt(5)))/2
dessous droit
The orange vertices at [1,-1,-1] and [1,-1,1]
The pink vertex at [f,0,-1/f] and [f,0,1/f]
The blue vertex at [1/f,-f,0]
n5 = 1/5 * [1/f+2+2*f, -2-f, 0] / R
n5 = 1/5 * [1/f+2+2*f, -2-f, 0] / (sqrt(5/2+11/10*sqrt(5)))/2
dessous gauche
The orange vertices at [1,-1,-1] and [-1,-1,-1]
The blue vertex at [1/f,-f,0] and [-1/f,-f,0]
The green vertices at [0,-1/f,-f]
n6 = 1/5 * [0, -1/f-2-2*f,-2-f] / R
n6 = 1/5 * [0, -1/f-2-2*f,-2-f] / (sqrt(5/2+11/10*sqrt(5)))/2
if i take
f=1,6
R=1.11
i hope it's not less.
n1 = [3.6/5.11, 1/5.11, -1.165/ 1.11 ]
i certainly finish for next day.
cheers |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Thu May 02, 2013 8:17 pm Post subject: |
|
|
perhaps, i do a mistake.
i write the formula, but the dodeca are not regular?
f1 = 1.11- abs(3.6/5.11*x+ 1/5.11*y -1.129/ 1.11*z )
f2 = 1.11- abs(1.129/1.11*x+3.6/5.11*y+ 1/5.11*z)
f3 = 1.11- abs(-3.6/5.11*x+ 1/5.11*y -1.129/1.11*z)
f4 = 1.11- abs(1/5.11*x+ 1.129 / 1.11*y -3.6/5.11*z)
f5 = 1.11- abs(1.129 / 1.11x -3.6/5.11*y +1/5.11*z)
f6 = 1.11- abs(1/5.11*x -1.129 / 1.11*y -3.6/5.11*z)
f(x,y,z)=
min(min(min(min(min(1.11- abs(3.6/5.11*x+ 1/5.11*y -1.165/ 1.11*z )
,1.11- abs(1.165/1.11*x+3.6/5.11*y+ 1/5.11*z) )
,1.11- abs(-3.6/5.11*x+ 1/5.11*y -1.165/1.11*z) )
,1.11- abs(1/5.11*x+ 1.165 / 1.11*y -3.6/5.11*z) )
, 1.11- abs(1.165 / 1.11*x -3.6/5.11*y +1/5.11*z) )
,1.11- abs(1/5.11*x -1.165 / 1.11*y -3.6/5.11*z ))
cheers |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Thu May 02, 2013 8:29 pm Post subject: |
|
|
hello all
's not 5.11 but 5.55
but, it's a same.
i don't know if the order of f1 , f2 ;;;;;
is important?
it's a beginning
cheers |
|
Back to top |
|
 |
abdelhamid belaid
Joined: 13 Aug 2009 Posts: 170
|
Posted: Fri May 03, 2013 12:27 am Post subject: |
|
|
Hello,
Yes Denis order is important generally.
you wrote:
Quote: | for the cube
max(max(abs(x),abs(y)),abs(z))
don't work
max(max(abs(x),abs(y)),abs(z))-1
work ? |
mathematically we know that max(a+c, b+c) = max(a,b) + c so "max(max(abs(x),abs(y)),abs(z))-a = max(max(abs(x)-a,abs(y)-a),abs(z)-a)"
when you write only "max(max(abs(x),abs(y)),abs(z))" you have just chosen a=0, it works, it's a cube but a=0 here.
We agree we must take advantage of the similarity the dodecahedron has, this is a simplified formula:
Code: | F(): max(
max(
sin(1.07498)*sqrt(x*x+y*y)*cos(atan(tan(2.5*atan2(y,x)))/2.5)+cos(1.07498)*z
,
sin(1.07498)*sqrt(x*x+y*y)*cos(atan(tan(2.5*(atan2(y,x)+pi/5)))/2.5)-cos(1.07498)*z )
,
abs(z) )- 3.2
[x]: -4 , 4
[y]: -4 , 4
[z]: -4 , 4 |
 _________________ My YouTube channel |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Fri May 03, 2013 8:22 am Post subject: |
|
|
:)Hello Mr belaid
Great thanks for your answer and comment. |
|
Back to top |
|
 |
abdelhamid belaid
Joined: 13 Aug 2009 Posts: 170
|
Posted: Fri May 03, 2013 9:26 am Post subject: |
|
|
I think we didn't finish, we have just began , for me the important is not this formula, there are many methods to reach one, for the dodecahdron all faces are the same (a plane), we have similarity here, I mean it's logical that there is a formula without max and min, imagine if we can creat it just starting with one plan(z-a=o for example), as you have seen I got five faces starting from one just writing "atan(tan(2.5*atan2(y,x)))/2.5" instead of "atan2(y,x)", the question is: How ????? _________________ My YouTube channel |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Fri May 03, 2013 10:39 am Post subject: |
|
|
i think exactly , the same.
it's for that , i had post my question in first .
((i hoped , someone andswer me a formula with no booléens.
but perhaps, it's a dream ))  |
|
Back to top |
|
 |
Furan
Joined: 05 Oct 2010 Posts: 64 Location: Prague, Czech Republic
|
Posted: Fri May 03, 2013 12:08 pm Post subject: |
|
|
Well, using functions like atan(tan()) etc. does offer simple usage of various sawtooth waves, step functions etc., but it's "dirty". It's sadistic to force the cpu to calculate twice some form of Taylor series or similar operation, if you could just use some logical operations and modulo.
http://en.wikipedia.org/wiki/Modulo_operation
You can get sharp edges with veeeery high power
For example a cube:
x^n+y^n+z^n = (a/2)^n
I'm pretty sure you could get a dodecahedron by:
F(x,y,z) = f1 + f2 + f3 + ... + f6
f_i = R^n - (n_i * X)^n
Round edges for lower n. Try it. |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Fri May 03, 2013 1:52 pm Post subject: |
|
|
hello mr Furan
thanks for this new way.
what do you mean by ^n and Round edges for lower n ?
i cannot translate properly?
(for the moment, i try your first formula for the icosaedron)
cheers
denis |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Fri May 03, 2013 3:36 pm Post subject: |
|
|
for icosa
i take 1/3* for calculate the middle point ?
but it's more horrible that dodeca.
i'm look like a bad architect in asterix and result also!
( funny write)
test by yourself
min(min(min(min(min(min(min(min(min(0.75- abs(4/9*y+4.8/3*z),
0.75- abs(-4/9*y+4.8/3*z)),
0.75 -abs(-10.4/9*x+10.4/9*y+10.4/9*z)),
0.75- abs(10.4/9*x+10.4/9*y+10.4/9*z)),
0.75- abs(-10.4/9*x-10.4/9*y+10.4/9*z)),
0.75- abs(10.4/9*x-10.4/9*y+10.4/9*z)),
0.75- abs(-4.8/3*x-4.08/3*y+4/9*z)),
0.75- abs( 4.8/3*x-4.08/3*y+4/9*z) ),
0.75- abs(-4/9*x-4.8/3*y-4.08/3*z) ),
0.75-abs(4/9*x-4.8/3*y-4.08/3*z)) |
|
Back to top |
|
 |
abdelhamid belaid
Joined: 13 Aug 2009 Posts: 170
|
Posted: Fri May 03, 2013 5:03 pm Post subject: |
|
|
Hello,
thanks Furan, you have your own standards anyway.
Denis, if you want to make a dodecahedron using Furan's first way you would use my formula to avoid calculations and generate every plane formula easily:
an upper plane has a formula of the form sin(1.07498)*sqrt(x*x+y*y)*cos(atan(tan(2.5*atan2(y,x)))/2.5)+cos(1.07498)*z that means sin(1.07498)*sqrt(x*x+y*y)*cos(atan2(y,x)+n*2*pi/5)+cos(1.07498)*z such that n=-2, -1, 0, 1, 2
(n=0) plane number 1 formula is:
sin(1.07498)*sqrt(x*x+y*y)*cos(atan2(y,x))+cos(1.07498)*z = sin(1.07498)*x+cos(1.07498)*z
(n=1) plane number 2 formula is:
sin(1.07498)*sqrt(x*x+y*y)*cos(atan2(y,x)+2*pi/5)+cos(1.07498)*z =
sin(1.07498)*(x*cos(2*pi/5)-y*sin(2*pi/5))+cos(1.07498)*z
................etc
maybe this way is the fastest to get every plane formula  _________________ My YouTube channel |
|
Back to top |
|
 |
denisc
Joined: 24 Apr 2013 Posts: 92
|
Posted: Fri May 03, 2013 6:38 pm Post subject: |
|
|
thank very much, Mr belaid for your help.
i try all , quickly.
 |
|
Back to top |
|
 |
|
|
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
|