[racket] rotate an image using 2htdp/image

2010-07-20 Thread Mathew Kurian
Yes. I finally get it. My professor went in some detail with all of your explanation and it makes sense. Thank you. This thread can be closed now. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] rotate an image using 2htdp/image

2010-07-20 Thread Robby Findler
No, but its upper left corner is consistently being kept at (20,20), as the code asks. If you were to write (underlay (rotate ang TRI) BACKGROUND) in the body of render, you'd see the triangle also wiggling in this way, but that's because the center of the bounding box is being kept in a fixed

[racket] rotate an image using 2htdp/image

2010-07-19 Thread Mathew Kurian
OK. Here is what I am trying to do. The game screenshot: http://img829.imageshack.us/img829/4864/65490383.jpg I am trying to rotate the guy's arm by the dynamic degree denoted on the bottom-left corner of the screen. I just have to center the rotated image. How would I go about doing that? Com

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Mathew Kurian
@Robby Findler : I see what you mean. But in this example given by Paul Ojanen (require 2htdp/image) (require 2htdp/universe) (define BACKGROUND (rectangle 100 100 "outline" "white")) (define TRI (triangle 35 "solid" "blue")) (define (render ang) (place-image (rotate ang TRI) 20 20 BACKGROUND))

[racket] rotate an image using 2htdp/image

2010-07-19 Thread Mathew Kurian
Woah...so many good responses...thank you all Now give me some time to read all of this and try to understand before I ask another question. NOTE: This topic is not yet closed. I will get back with a response in a bit. Gotta ask my professor some questions as well. Paul Ojanen's reply outlined t

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Paul Ojanen
ly 19, 2010 5:52 PM > To: Eugene Wallingford > Cc: users@racket-lang.org > Subject: Re: [racket] rotate an image using 2htdp/image > > Well, the 2htdp/image library does not work like that. If you overlay > and the rotate then your background will be roated. If you rotate and

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Paul Ojanen
"solid" "blue" (big-bang 1 (on-tick add1) (on-draw render)) -Paul _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Mathew Kurian Sent: Monday, July 19, 2010 4:38 PM To: users@racket-lang.org Subject: [racket] rot

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Matthias Felleisen
But these are two orthogonal questions: -- rotating an image -- placing an image in a "constrained" background Shouldn't they be provided by two distinct functions? On Jul 19, 2010, at 5:32 PM, Eugene Wallingford wrote: > >>> Just want to clear up thingsthe how can adjust the pinho

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Robby Findler
Well, the 2htdp/image library does not work like that. If you overlay and the rotate then your background will be roated. If you rotate and then overlay the you may place things in different (relative) positions but you still don't get any different behavior by rotating around different points. Ma

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Eugene Wallingford
> > Just want to clear up thingsthe how can adjust the pinhole or the > > rotation center? > > There is no pinhole. My earlier reply was trying to tell you that this > question does not make sense. Perhaps Matthew is concerned not so much with the resulting orientation of the image

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Robby Findler
On Mon, Jul 19, 2010 at 3:37 PM, Mathew Kurian wrote: > > > > Just want to clear up thingsthe how can adjust the pinhole or the > rotation center? There is no pinhole. My earlier reply was trying to tell you that this question does not make sense. Go get a rectangle (maybe a plate in your ho

[racket] rotate an image using 2htdp/image

2010-07-19 Thread Mathew Kurian
Just want to clear up thingsthe how can adjust the pinhole or the rotation center? And Stephen Bloch, can you explain in a bit more detail...seems like that is exactly what i am looking for...but i am having challenging understanding the concept. I am making trying to make a shooter game and

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Stephen Bloch
On Jul 19, 2010, at 11:54 AM, Mathew Kurian wrote: > I am trying to rotate an image around a certain point. Using the 2htdp/image > and its rotate function, it seems to be rotating the image. > > But what is it rotating around? In a sense, it's the center (more precisely, the center of the b

Re: [racket] rotate an image using 2htdp/image

2010-07-19 Thread Robby Findler
There is no difference between rotating an image around different points in the image. (Give it a try and see!) Robby On Mon, Jul 19, 2010 at 10:54 AM, Mathew Kurian wrote: > Hi guys, > > Hope you all having a great day. > > I got a question for you all. > > I am trying to rotate an image around

[racket] rotate an image using 2htdp/image

2010-07-19 Thread Mathew Kurian
Hi guys, Hope you all having a great day. I got a question for you all. I am trying to rotate an image around a certain point. Using the 2htdp/image and its rotate function, it seems to be rotating the image. But what is it rotating around? I appreciate all your help. Thank you. MK _