merging two objects as function

lawrence shared this question 6 years ago
Answered

need to construct a piecewise 'function" of cylinder 'd' and cone 'a' , so that i can move a general from origin to any point on this combined objects. Please help. thanks

Comments (10)

photo
1

when we say 'piecewise', we say multiple domains.


where are domains in issue52.ggb ?

photo
1

domain; ALONG Y-AXIS: height of cylinder betwen 0 and 8 and for cone domain between 0 and 3.. thanks

photo
1

ok, you have:

cyl: AB {(3.2. 0),(3.2, 8)}

con: BC {(3.2, 8),(0, 11)}

r: OA {(0, 0),(3.2, 0)}

ax: OC {(0, 0),(0, 11)}

ang: 2π

then you can do

1) Polyline{O,A,B,C}: {(0, 0),(3.2, 0),(3.2, 8),(0, 11)},

2) Line{O,C}: {(0, 0),(0, 11)},

and

3) Surface knowing angle of rotation, ang=2*pi.

Now, put these, row by row, into input window of Geogebra using copy from here ( from this message ) paste in input window of Geogebra then push Enter after each pasted:

Execute[{"(0, 0)","(3.2, 0)","(3.2, 8)","(0, 11)"}]

Polyline[A, B, C, D]

Line[A,D]

Surface[ f, 2*π, g]


Observation:

Execute[{"(0, 0)","(3.2, 0)","(3.2, 8)","(0, 11)"}], return names of points: A, B, C, D

photo
1

See appended file

photo
2

Hi,


Many behaviour are possible...


eg:

https://www.geogebra.org/ma...


...

photo
1

Surface[

(3.2-r)*cos(u) ,

(3.2-r)*sin(u) ,

8+r,

u, 0, 2 π ,

r, 0, 3.2

]

Surface[

3.2*cos(u) ,

3.2*sin(u) ,

h,

u, 0, 2 π ,

h, 0, 8

]

Surface[

r*cos(u) ,

r*sin(u) ,

0,

u, 0, 2 π ,

r, 0, 3.2

]

photo
1

    Execute[{"(0,0)","(3.2,0)","(3.2,8)","(0,11)","(-3.2,8)","(-3.2,0)","Line[(0,0),(0,11)]"}]

    Polygon[A,B,C,D,E,F]

    Surface[

    poly1,

    pi,

    f

    ]


;-)

photo
1

    Execute[{

    "(0,0)","(3.2,0)","(3.2,8)","(0,11)","(-3.2,8)","(-3.2,0)",

    "Polygon[(0,0),(3.2,0),(3.2,8),(0,11),(-3.2,8),(-3.2,0)]",

    "Line[(0,0),(0,11)]",

    "Surface[

    Polygon[(0,0),(3.2,0),(3.2,8),(0,11),(-3.2,8),(-3.2,0)],

    pi,

    Line[(0,0),(0,11)]

    ]"

    }]


:-)

photo
1

    Execute[{

    "Polygon[(0,0),(3.2,0),(3.2,8),(0,11),(-3.2,8),(-3.2,0)]",

    "Line[(0,0),(0,11)]",

    "Surface[

    Polygon[(0,0),(3.2,0),(3.2,8),(0,11),(-3.2,8),(-3.2,0)],

    pi,

    Line[(0,0),(0,11)]

    ]"

    }]


Copy from here entire command Execute[{}] and do paste into Input window of Geogebra then push on Enter key.

Enjoy entering sequences of commands into Input window of Geogebra using Execute[{}] command.


    Execute[{

    "Surface[

    Polygon[(0,0),(3.2,0),(3.2,8),(0,11),(-3.2,8),(-3.2,0)],

    pi,

    Line[(0,0),(0,11)]

    ]"

    }]



    Execute[{

    "Surface[

    ( (3.2-r)*cos(u) , (3.2-r)*sin(u) , 8+r ),

    u, 0, 2 π ,

    r, 0, 3.2

    ]",

    "Surface[

    ( 3.2*cos(u) , 3.2*sin(u) , h ) ,

    u, 0, 2 π ,

    h, 0, 8

    ]",

    "Surface[

    ( r*cos(u) , r*sin(u) , 0 ) ,

    u, 0, 2 π ,

    r, 0, 3.2

    ]"

    }]


wink

photo
2

Good morning Geogebra !


    Execute[{

    "A=(0,0)","B=(3.2,0)","C=(3.2,8)","D=(0,11)","E=(-3.2,8)","F=(-3.2,0)",

    "G=Polygon[A,B,C,D,E,F]",

    "H=Line[A,D]",

    "I=Surface[

    G,

    pi,

    H

    ]"

    }]



    Execute[{

    "A=(0,0)","B=(3.2,0)","C=(3.2,8)","D=(0,11)","E=(-3.2,8)","F=(-3.2,0)",

    "G=Polygon[A,B,C,D,E,F]","H=Line[A,D]","I=Surface[G,pi,H]"

    }]



    Execute[{

    "Surface[((3.2-r)*cos(u),(3.2-r)*sin(u),8+r),u,0,2π,r,0,3.2]",

    "Surface[(3.2*cos(u),3.2*sin(u),h),u,0,2π,h,0,8]",

    "Surface[(r*cos(u),r*sin(u),0),u,0,2π,r,0,3.2]"

    }]

maine geogebra smile

© 2023 International GeoGebra Institute